Sir, I need your help in the following topic.
I am often confused of value member and display member in comboBox fill funtion.
I have no doubt on filling a non- dependent table.
but in the case of a foreign key column, I am became confused.
let me know which column should be set as Valuemember and Displaymember?
I have a knowledge that primary key to be set as Display and the column we want in
combobox to be set as Valuemember. Is this correct?
Loading

Jignesh TrivediPosted Jul 10, 2013, 7:19 AM
hi,
name suggest itself....
DisplayMember property represent the text information displayed in drop down / combo box.
ValueMember property represent the value information that can be used to stored in database.
yes, generally valuemember is id(int) field which may foreign key column in to main table.
for example
I have one customer table and it has city field which foreign key column of City Table.
then displaymember property contain CityName and valuemember contain CityId
hope this will help you.
Bineesh ViswanathPosted Jul 10, 2013, 8:10 AM