Tie an Editor to a Filter Descriptor

2 posts, 0 answers
    WILLIAM avatar
    134 posts
    Member since:
    Jun 2012

    Posted 08 Oct 2012 Link to this post

    Bare with me, this will take a bit to explain.  I need to be able to reference a specific editor instance to its specific filter descriptor instance.

    Our users have become used to a filter control that recognizes a lot of operators that aren't supported by Telerik.  Specifically, in this case, the IsAnyOf and NotIsAnyOf operators.  I have overcome this problem by completely handling this differently with a control that I built that sets the IsAnyOf or NotIsAnyOf operators and the values the user has chosen.  All of this works fine, but here's the problem:

    If the user removes a filter descriptor, there is no way for me to determine what specific editor was being used, and therefore I cannot remove the data structure that I have built which holds the operator and values that the user has chosen.  I thought the answer was to put a key in the Tag property of the Editor, but unfortunately this doesn't work, because when the FitlerDescriptorCollection Changed event fires, the descriptor that was removed has no reference (and as far as I can tell), no way to figure out what the editor was so that I can retrieve the key from that Tag property.  

    I also thought about adding the key to the filter descriptor itself when it's created, but there is no Tag property on that, and again, there is not way to get the editor either.

    Any ideas or suggestions on how to accomplish this?

    Thanks for your help!!
  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 09 Oct 2012 Link to this post


    I am afraid that the information that your require is not available at the moment the user deletes a filter.

    But even if it was, how is our data engine going to handle a filter operator which it does not support? In other words, what will be written in the respective FilterDescriptor (Member-Operator-Value) before it is used for filtering by the data engine. The data engine builds a LINQ query based on the stuff written in Member-Operator-Value, for example:

    var result = sourceCollection.Where(customer => customer.Name == "John");

    The data engine supports only a finite set of FilterOperator's and know what LINQ queries to compose when it encounters one of them.

    How are your custom operators going to be supported, i.e. who is going to create the approapriate LINQ query?

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top