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

RadItem Collection Editor

3 Answers 200 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jerry
Top achievements
Rank 1
jerry asked on 14 Jan 2010, 04:45 PM
I'm using the RadItem Collection editor to add items to my combobox.  I see a place to enter the display text but where can I enter a value that I can use within c#?  I'm trying to use my combobox's SelectedValue property but it comes back as null.  Why would selectedtext come back as "" when it has been selected?

Thank You

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 15 Jan 2010, 09:18 AM
Hi jerry,

Thank you for your questions.

Please refer to our online documentation for the first question.

SelectedText is only valid while RadComboBox has the focus. It corresponds to the part of the text that is selected in the text box part of RadComboBox. Just like a stand alone text box, when it loses focus, all its text is deselected, therefore you can not get the SelectedText property by clicking on another control.

Please write again if you have other questions.

All the best,

Victor
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.
0
jerry
Top achievements
Rank 1
answered on 15 Jan 2010, 02:56 PM
Victor,
Thank you for your help. 

I'm still a bit confused on how to set the value of a combobox item.
Within the link you sent me it says // SelectedValue is valid only in a data bound scenario.
I'm not binding my comboboxes to any data source just filling it in either manually or through code.  I have values I have to use since I dynamically create a string that uses the values not the text of a drop down item.  I do apologize if I'm completely missing your point.

Thank You
Jerry
0
Victor
Telerik team
answered on 18 Jan 2010, 07:36 AM
Hi jerry,

Thank you for writing. You are not missing the point. If you need to set a value you can store it in the Tag property of RadComboBoxItem -- every RadElement has a Tag property. Please write again if you need further assistance.

Greetings,
Victor
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
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
jerry
Top achievements
Rank 1
Answers by
Victor
Telerik team
jerry
Top achievements
Rank 1
Share this question
or