Hi all,
I have a ultracombobox which look like this (below) and the sr_function_hid will hide from user. How should I program and assign the selected row based on the sr_function_hid value?
now if i direct assign ucbFunction.text = 148 (the value of sr_function_hid which148), it will only show the "148" in the dropdown, insteed of show "NSX_ATV".
Please guide.
Thank you very much !
yea is done now. I forgot it allow me to set the value member and display member >_<
Thanks alot.
Make sure your ValueMember and DisplayMember are set correctly. In this case, the ValueMember should point to sr_function_hid and the DisplayMember should be Name.
The ValueMember property is linked to the control's Value property. So when you want to "select" something in code, you can either set the Value or the Text property of the control. But if you set the Text, you have to set it to something in the DisplayMember column, and if you set the Value, you should use a value in the ValueMember column.
In this case, you want to set the combo.Value = 148