473,414 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

ComboBox and msflexgrid

JFB
Hi Folks,
I'm using ado.net and I have a combo box inside of a msFlexgrid, so when I
selected the item from the combo I'm passing this value to the
textMatrix(row,col).
At the time to press the save botton I'm using a for loop thru the
msFlexgrid to get the data and save it in the table, but I have the
lastname+firstName values in the cell and I need the customerID.
How can I fix this? Any idea?
Tks
JFB

Select employeeID, lastName+ ', '+ firstName AS fullName from employees
order by lastName

' Attach dataset's DefaultView to the datagrid control
Dim dv As DataView = ds.Tables("Employees").DefaultView
ComboBox1.DataSource = dv
ComboBox1.DisplayMember = "fullName"

For i = 1 To OrderFlexGrid.Rows - 1

Param = cmd.Parameters.Add("@employeeID", SqlDbType.Int, 4)

Param.Value = OrderFlexGrid.get_TextMatrix(i, j + 3).ToString

Next
Nov 20 '05 #1
1 3180
Cor
Hi JFB,

I don't know if it is the only thing,
But in your combobox you can say
' Attach dataset's DefaultView to the datagrid control
Dim dv As DataView = ds.Tables("Employees").DefaultView
ComboBox1.DataSource = dv
ComboBox1.DisplayMember = "fullName"

Combobox1.valuemember = "myvalue"

And then use the value.

I hope this helps?

Cor


Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ed | last post by:
Hi, I am using an MSflexgrid in my c# code. I have a strange problem. My MSflexgrid has only 1 column. Now the data in that column can be long. WIth just 1 column the MSflexgrid does not show...
1
by: PVS | last post by:
Hi, I am new to VC++ 7.0. I want to use MSFlexGrid in my dialog based MFC project in VC++ 7.0 (in VS ..NET IDE). I added the MSFlexGrid control into my resource editor toolbox and I dragged and...
0
by: Martin K | last post by:
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder API problem, I was able to put together a public class that runs great! But I have another migration headache regarding the...
1
by: Mad Scientist Jr | last post by:
can someone explain how to simply populate a grid in .net ? the way i understand it, there is no more msflexgrid, and instead is this new control that has to be tied to a dataset, and it is a real...
1
by: zoneal | last post by:
Hi, I am involved in the process of migrating vb(6.0) application to vb.net. My application contains only vb controls namely MSFLEXGRID. I want to migrate my application to vb.net completely...
1
by: Steven | last post by:
I develop the application which contains MSFlexGrid to display data. When I try to fill the grid with the text data, I want to adjust the column width so that the width is adjusted to the maximum...
5
by: Ishmael | last post by:
Hi Is Been a 3 Yrs Now (I Still trying to do this) Please help me to do this with Visual Basic 6.0 using Msflexgrid Let say you are the Principal . You have 10 educators and 5 class (Grades)...
0
by: vaavachi | last post by:
Hi, I would like to allow users to select from a drop down list for all cells in, let say, column 3. How can I add a combo box to that column? I read something about a "button" property of...
5
by: rekhasc | last post by:
hi......... can anyone help me to write the code to get a field from database using combobox and that should display the corresponding record in Msflexgrid using vb6.0 I am using access 2007 and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.