Text versus SelectedValue

2 posts, 0 answers
  1. MikeB
    MikeB avatar
    42 posts
    Member since:
    May 2008

    Posted 14 Jan 2010 Link to this post

    Can you explain the correct usage of the RadMultiColumnComboBox SelectedValue and Text properties.  It seems that they are not always in sync.  For example when the DataSource is set, the SelectedIndex == 0, SelectedValue == value of Item[0], but the Text property == "".

    I'm trying to determine when I should (or could) use the Text property.  If I use it to "set" the Text property does the SelectedIndex/Item/Value also get set?

    What event causes the Text property to be set?  Is it after an event is finished?

  2. Deyan
    Deyan avatar
    2026 posts

    Posted 19 Jan 2010 Link to this post

    Hi MikeB,

    Thanks for contacting us and for your questions. The Text of RadMultiColumnComboBox is always changed by the value of the cell selected as a DisplayMember when the current row inside the drop down is changed. That happens when you select a row from the drop down and when you set the SelectedValue/SelectedIndex properties. The Text property should also be initially set when you bind RadMultiColumnComboBox to a data source.

    You can use the Text property to acquire the current value of the DisplayMember cell of the selected row in the control. By setting this property, however, you cannot select a row in the control. You need to use SelectedValue/SelectedIndex properties instead.

    Since you also report an issue with not getting the Text property properly initialized upon binding, I would like to ask you to prepare a small Windows Forms application that I can use to reproduce the issue and see what goes wrong and thus be able to better help.

    Thanks for your time.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
Back to Top