I have an UltraCombo bound to a datasource.
In my code I go combo.value = 3 but the row that has the id of 3 isn't selected/displayed.
There is definitely a row with an id of 3 in the dropdown because if I select the row and debug it I can see that the value is 3.
Any ideas?
To clarify the behavior I have the
dropdownstyle = dropdownlistlimittolist = true
In the debugger if I set the value to 306. The Text says ENZN which is the correct value, but it doesn't go ahead and select the row, so the dropdown still shows the null value. If I click on the dropdown it opens and ENZN is the first item, i.e it's scrolled to the correct spot in the list. But it just doesn't show it when the dropdown is in the closed state.
I'm afraid I am not following you. If the text is showing the correct test, then what exactly is "shows the null value?" Do you mean you are checking the selected row in code and it's nt the right one?
What version of the controls are you using?
My ultracombo is a multi column combobox and column(0) is my displaymember
I could resolve it by using the TEXT property :)
I'm running into a wierd senario. When I set the text property it works--but it also clears all the values out of the drop-down list. Seems I can either set the value, or have a drop-down list but not both. :-(
Only problem I can think of is that the Text property you are setting is not part of drop-down list. Just make sure that you choose something out of dropdown list for Text property.
Makes sense. What method would I use to set it?
Finally got it to work using the following code:
MyUltraCombo.DataSource = queryDS.Tables(0) 'load the new data
'Restore the previous selection If tempValue <> "" Then For Each row As Infragistics.Win.UltraWinGrid.UltraGridRow In MyUltraCombo.Rows If row.Cells(0).Value.ToString = tempValue Then MyUltraCombo.SelectedRow = row End If NextEnd If