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!
mfaina said: 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?
Binding the Text property of the control is an unusual thing to do. Typically, you would bind the Value property. Are you trying to bind both properties? What is the data type of the ValueMember field and what is the data type of the DisplayMember field? And what is the data type of the field you are binding the Text property to? I assume it's a string, is that correct?
mfaina said: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?
Set the Value property on the control to initialize the value.
"Value" property - can't see in design mode for the combo - I have only ValueMember.
OK, it is the one in "Advanced bindings", right? The only thing available is "binding" "Data Source update mode", "Format Mode" and "Null value" to set if this the property that you are talking about.
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.