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.
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!
"Value" property - can't see in design mode for the combo - I have only ValueMember.
Yes, I agree about "Text" but I am looking for it in a separate collection so that is why. Granted I can get the value and look up the key and find the text. I am binding only one property - should I bind them both? ValueMemeber is the key (int) and DisplayMember is "Value" (a string in my object).