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?
If I stopped the code with the debugger, and popped 306 into the value field (via the debugger) then the text property would change correctly (again in the debugger). However the text wasn't being displayed in the actual control on the form. The control itself would just show null. I deleted the control from the form and added it back in with the same code and everythign worked as expected. I beat my head on this for days though so would love to know what was going on.
I'm afraid I have no explanation for that. Maybe there was some property setting on the original control that is no longer set on the new one.
Yeah, really weird. Certainly wasn't any property I could spot.
I am having a similar problem. I want to change the value of ultracombo according to a click on ultrawingrid.
The default value of my ultracombo is NULL so it is not showing anything initially and when u click on it u can see the list. When something is selected from the list it is shown in the combobox. Now I want to change this value according to a value selected on the ultrawingrid.
If I use ultracombo.value property , it sets the value to the selected value on the ultrawingrid, but that is not shown in the ultracombo.
It might be something with changing Datamember or DisplayMember property!!!
Your help is appreciated,
Thanks
Shivangi
My ultracombo is a multi column combobox and column(0) is my displaymember
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
Makes sense. What method would I use to set it?
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.
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. :-(
I could resolve it by using the TEXT property :)