Adding a large list of Id's to FilterDescriptor

2 posts, 0 answers
  1. Simon
    Simon avatar
    1 posts
    Member since:
    Feb 2016

    Posted 29 Jul 2016 Link to this post

    So I have a large list of Id's that I want to create a filter for and return. I was just adding a FilterDescriptor for each one but I found that once it got over a certain amount I get a stack overflow error. So I am trying to use the IsContainedIn operator.



    private static void AddSiteIdFilterToRequest(DataSourceRequest request, IList<Guid> siteGuidList, string columnName)
    if (siteGuidList == null || !siteGuidList.Any()) return;

                var filterCollection = new CompositeFilterDescriptor { LogicalOperator = FilterCompositionLogicalOperator.Or };
                filterCollection.FilterDescriptors.Add(new FilterDescriptor { Member = columnName, MemberType = typeof(Guid), Operator = FilterOperator.IsContainedIn, Value = siteGuidList });

  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 02 Aug 2016 Link to this post

    Hello Simon,

    I'm afraid that it is not clear what your scenario is. If you want to set DataSource filters manually you should use its filter method. If server operations option is enabled the DataSource will send the filter descriptors to the server for processing. If you need to pass some additional data with the request, this can be done by assigning a JavaScript function as described in this help article.

    If you continue to experiencing difficulties and as your question does not seems to be directly related to this thread's topic, I would suggest you to open a separate support request and provide a small runnable sample which to demonstrate your exact scenario and the issue you are facing.

    Maria Ilieva
    Telerik by Progress
    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
Back to Top