RadDropDownList - Filtering or Enabling/Disabling Items at runtime

2 posts, 0 answers
  1. Keith
    Keith avatar
    102 posts
    Member since:
    Mar 2015

    Posted 14 Jan Link to this post

    I have a Windows application written in VB.Net.  It has a RadDropDownList control that has Items added to it at Design time.

    I would like to Filter the items in the RadDropDownList control or disable/enable some items in the RadDropDownList control depending on the data in the other controls on the WinForm.

    I have tried looking at the documentation but it is not clear on how to filter the RadDropDownList or find some items to be enabled or disabled in the RadDropDownList when the control has items added at design time not at runtime.

    I am using version 2015.3.1104.40 of the RadDropDownList.

     Please help.  Thanks!

  2. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    711 posts

    Posted 18 Jan Link to this post

    Hello Keith,

    Thank you for writing.

    Filtering the items or disabling some items does not depend on whether the RadListDataItem has been added in the designer or at run-time.

    Filtering can be set by using a predicate and its Filter property or via a FilterExpression, more information is available here: http://docs.telerik.com/devtools/winforms/dropdown,-listcontrol-and-checkeddropdownlist/dropdownlist/filtering.html.

    I am sending you attached an example project which I believe should get you going. In the sample, the items are filtered depending on the value of a RadToggleSwitch control. I am also sending you a gif file showing the result on my end.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top