how to set values to text items in DropDownList control

2 posts, 0 answers
  1. Asa'ad
    Asa'ad avatar
    77 posts
    Member since:
    May 2011

    Posted 03 Jul 2011 Link to this post


    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
  2. Peter
    Peter avatar
    1153 posts

    Posted 06 Jul 2011 Link to this post

    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);
    d.Value = 78;

    I hope this helps.

    Kind regards,
    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!

Back to Top