DataGrid View bound ComboBox Column

leedo2k

Active member
Joined
Nov 9, 2006
Messages
28
Programming Experience
Beginner
Hi,

I am a bit confused here. I am designing a form for data editing. To accomplish this I used the standard DBgridView, BindingNavigator, TableAdabter, and DataSet by draging the table from the DataSources bar onto the form.

Pls find the details of my tables:

Tabel A:
Employee ID
Employee Name
Employee Ext

Table B:
Employee ID
Employee Salary

I am also using StronglyTyped DataSet. All queries and tables adapters are in a single XSD file. Also the binding navigator is binding to Table A.


Now what I need help with please is, how can I add the column
(Employee Salary) in a combo box in the DataGridView form. I can write an (Inner Join) query but the thing is I do not know where to place it to make the Combo box a lookup column, while committing the value of the matching (Employee ID) based on the user input. !!:confused:

Thanks
Leedo

PS: I am using VS 2005. (VB)
 
ComboBox Column

Thanks a million. The video is very good. However, when I do the same I get things work very good. However, the ID combo box shows the value member. It shows the display member when I click on the combobox.!!

Any deas?

Thanks
 
I dont understand what youre talking about...


>Thanks a million.
Youre welcome

>The video is very good
Thankyou

>However, when I do the same I get things work very good
Erm. How can that be a "however" ?
'Dear sir. I followed your instructions exactly. However, i found that it all worked identically'
--> You would say 'however' if it DIFFERED
'Dear sir. I followed your instructions exactly. However, i couldnt get past step 4, because I dont have a colour monitor'


>However, the ID combo box shows the value member.
>It shows the display member when I click on the combobox.

So, what does it show?
 
DataGrid column as bound ComboBox

Hi,

Sorry for the language. I must have been drunk when I wrote this, I myself do not understand it.

Anyway, I meant to say that although it works very well in the video, when I do it, my gridview combobox column shows the value member rather than the display member. Only when I click on the ComboBox I see the display member. When I focus away, the combo box shows the value member again!!!

I do not know what is wrong but I followed the simple steps exactly.

Thanks
 
Back
Top