Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1330
UltraComboEditor set selected item in DropDownList Mode?
posted

Hello, I'm sorry for such a noob question but I can't seem to find an answer... It's pretty simple.

 

I have a UltraComboEditor control and the DropDownStyle property is set to DropDownList.  This control has a list of the years and I want to (in code) set it to a particular year.

I don't know how to do this.  I've tried the text property the value property, selectedItem property... none of them seem to work when the control is in the DropDownList mode...

Parents
No Data
Reply
  • 469350
    Offline posted

    Any of these (Text, Value, or SelectedItem) should work - assuming you are setting them to something that exists on the list.

    Text would have to be set to the DisplayText of some item on the list.

    Value has to be set to the DataValue of an item on the list.

    And SelectedItem would have to be set to a ValueListItem on the list.

    If it's not working, then my guess is that you might be trying to set these properties before the list has been populated and therefore whatever value you are applying is not valid, since it doesn't exist on the list.

Children