Rakesh Kaushik

Rakesh Kaushik

  • NA
  • 56
  • 35.6k

combobox find item by value

Mar 13 2013 1:43 AM
Hello Guys,
Is there any way in a combobox to find the value and display the result.

in a combobox by the value
I have combobox cmbCategory bound to tabledata i.e.           
cmbCategory.DisplayMember = "categoryName";
cmbCategory.ValueMember = "categoryID";

in table Category i store the value as categoryID int, categoryName as varchar

as this combobox is on employee Entry Form. i want to modify particular employee record
for that when i pickup employee record from database through datareader categoryID
is in value based like 1 or 2.
I want to now load cmbCategory according to value ie 2 and display related categoryName

Please help me.



Answers (6)