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!
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;