How to get SelectedValue from Text ,,, Combobox ?
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hay .. I have a table for eg , emp with the next data : ID Name 1 AA 2 BB 3 CC I fill the combo box as the next :
combobox.ValueMember=ID; combobox.DisplayMember = Name;
the user see Name but the application save ID in the database . then when I navigate records , sure the combobox dispaly the ID which is saved on database ,, I tried to do that :combobox.SelectedValue = combobox.Text;
but it didn't give me the required result.. I want to view the Value (Name field) instead of text (ID field) thanksjooooo