I am binding an ultracombo to an object data source and want to bind the "Text"property to a property in my object. If the dropdown style is "DropDown" the selection is showing in the combo. If the dropdown style is "DropDownList" the selection from the drop down will NOT show in the combo. I switched back and forth the "Text" property (between binding it and not) and the result is the same - depends on the drop down style to show it or not. Am I missing a property that I need to set/reset?
As a separate question - I would like the combo to show the 1st item every single time I am entering the screen or repopulate. Again, is there a property for this or I have to handle an event that fired from the combo?
Thanks!
I meant something like this:
this.ultraCombo1.Value = initialValue;
If you want to initialize to the value on a particular row, you could do this:
this.ultraCombo1.Value = this.ultraCombo1.Rows[x].Cells[this.ultraCombo1.ValueMember].Value;
Mike, could you explain "set the value property on the control to initialize the value? Not exactly sure where and how to do it? Thanks!
Hm. Well... I can't explain that, then. There's no reason I can think of why the text would not show up when you select an item from the list.I could maybe understand it if the control's Text property was bound and the field it was bound to could not accept a string. But if it's not even bound, then that just makes no sense.
Can you duplicate that in a small sample project? If so, you should Submit an incident to Infragistics Developer Support.
ValueMember field type - int(key); DisplayMember type - Value (stiing) bascailly the only 2 fields avaialble in my case (DataSource is a list of KeyValuePairs).
Okay, now I am really confused. :)
I just re-reas your original post and you are saying that even when you don't bind the Text property of the control that when you select an item from the list and the Style is set to DropDownList, the selected item does not show up in the text portion of the control? That doesn't make any sense.
What's the data type of your ValueMember field and what's the data type of the DisplayMember field? Are you setting a DisplayMember or ValueMember? You do not have to set these, but what they are set to (or not set to) is important.