Setting default item selected in dropdown

2 posts, 0 answers
  1. Bort
    Bort avatar
    10 posts
    Member since:
    Nov 2006

    Posted 09 Mar 2011 Link to this post

    I am using the combobox in EnableLoadOnDemand mode. The data in the drop down has three collums (ID, Name, Address). I set my default selected item like this:
     
    Me.RadComboBox.SelectedValue = "9238"
    Me.RadComboBox.Text = "Smith, Jones"

    I happen to have 3 "Smith, Jones"  in my database each with different IDs. When I click on the drop down, the control is smart enough to get the 3 smiths matching the text in the dropdown but the selected item in the list is always the first one. The item with the 9238 ID happens to be the third item in the list so the default selection is invalid pointing to the wrong customer confusion my users. Is there a way to get the selected item in the drop down list to match the ID that I have set as the default starting value? It seems to me this should be a default behavior.
  2. Bort
    Bort avatar
    10 posts
    Member since:
    Nov 2006

    Posted 09 Mar 2011 Link to this post

    I figured out a workaround. Don't use MarkFirstMatch="true". Sucks because I want that normaly but just not on initial default render.
Back to Top