This is a migrated thread and some comments may be shown as answers.

Text versus SelectedValue

1 Answer 208 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
MikeB
Top achievements
Rank 1
MikeB asked on 14 Jan 2010, 04:47 PM
Hi,
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?

Thanks,
Mike

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 19 Jan 2010, 10:17 AM
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,
Deyan
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.
Tags
MultiColumn ComboBox
Asked by
MikeB
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or