RadDropDownList / RadListControl

4 posts, 0 answers
  1. kim
    kim avatar
    3 posts
    Member since:
    Mar 2009

    Posted 24 Jun 2010 Link to this post

    I want to add items to the RadListDataCollection.  But the RadListDataItem object has no setter for the Value. Before this was possible in the RadComboBoxItem. Is there any way around this?




  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 29 Jun 2010 Link to this post

    Hello kim,

    Thank you for writing.

    The old combobox's design wrongfully exposed a setter for the Value property of its items. Value is applicable only in a databound scenario and it is not mutable, because combo boxes and list boxes in general are presentation objects, which provide a selection and a current item. They do not and should not modify the underlying data.

    This is why the new RadListControl and RadDropDown list do not allow this. If you need to store custom information in unbound mode you can inherit from RadListDataItem and add whatever property you require.

    Please write again if you have other questions.

    Greetings,
    Victor
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Imran
    Imran avatar
    13 posts
    Member since:
    Jun 2010

    Posted 30 Jun 2010 Link to this post

    Is it possible to add Name, value pairs..  to the raddropdown list...

    such as if the visible text is "Sale" then the underlying value should be "S"
    and if the visible text in the drop downlist is "Purchase" then the underlying value should be "P".
    I just want to add two items to the drop down list at design time...

    thanks

    IK
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 05 Jul 2010 Link to this post

    Hi Imran,

    Thank you for writing.

    This is a very specific requirement, which we do not support out of the box, but you can easily implement it by inheriting from RadListDataItem and overriding the Value property to return the first character of the Text property value. The Value property can not be overridden in the Beta release but will be modified in the Q2 release.

    Please write again if you have other questions.
     
    All the best,
    Victor
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top