Hi All,
I am using an UltraComboEditor. I am binding it to a datatable. I tried to set the selected item of the combobox programmatically based on a value stored in the database before showing the combo box. But i am unable to see the selected item. I tried using SelectedITem,SelectedText,Value and Text property of the combo box, but couldn't make it work.
Am i missing something here?
Could any one please help me on this?
Thanks in Advance,
Hi Manikandan,
Setting the Value on the ComboEditor should work. Are you setting it before or after you bind the control? You should be binding first and setting the Value after.
Mike,
I think i am missing some thing here. Following is my code snippet.
comboBox.DataSource = itemsTable; // itemsTable is a data table with two columns "Caption" and "Values" and some n number of rows
comboBox.DataSource = itemsTable;
comboBox.ValueMember = "Values";
comboBox.Value = dc.DataValue; // dc.DataValue is the value to be selected. And i confirmed it that it has the correct value.
Manikandan