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

how to set values to text items in DropDownList control

1 Answer 191 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Asa'ad
Top achievements
Rank 1
Asa'ad asked on 03 Jul 2011, 03:55 PM
Hi;

i use DropDownList control, i added many items and set "Text" properties for each item, but how to set a value to item, i need the selected value.

i do not see any field lets me fill the value of item,

see the attachment

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 06 Jul 2011, 01:37 PM
Hello Asa'ad,

Thank you for the question.

You cannot set a Value via the Design Time Collection Editor. The value can be set through the RadListDataItem's Value property, for example:

RadListDataItem d = new RadListDataItem("Text", myValue);
//Or
d.Value = 78;

I hope this helps.

Kind regards,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
DropDownList
Asked by
Asa'ad
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or