Custom Editors

3 posts, 1 answers
  1. Lilia
    Lilia avatar
    32 posts
    Member since:
    Mar 2011

    Posted 28 Jul 2011 Link to this post

    Hello Telerik team,

    I have a RadDataFilter with combo box for custom editor like in your example
    I'm using the DataFilter in unbound mode so I have a button Search which gets the filters from the filter and initiate a search. My question is how can I get the selected item from the ComboBox in the DataFilter. For example in your example I select 'Crab Meat' from the combobox which has lets say ID=5. In the FilterDescriptors collection in the DataFilter I get the value 'Crab Meat'. How can I get the whole item that is selected from the combobox so I can see that it has ID=5?
  2. Lilia
    Lilia avatar
    32 posts
    Member since:
    Mar 2011

    Posted 29 Jul 2011 Link to this post

    I managed to get the selected Items like this:


    Is there a better way without browsing through the whole collection of comboboxes?

  3. Answer
    Dimitrina avatar
    3769 posts

    Posted 01 Aug 2011 Link to this post

    Hello Lilia,

     Generally working with the UI elements (as searching in the Visual Tree) is definitely not a recommended approach as it may lead to future problems. It is better to work with the data elements.

    May you please specify what combo box do you mean? If you do mean your custom combo, used for selecting the appropriate data, then you may directly access it. Having a reference to your control allows you to find the info that you need from the selected value.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top