We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

RecordFilterDescriptorCollection Class

I have a question about the Syncfusion.Grouping.Filters.RecordFilterDescriptorCollection Class. I have a method I use to apply filters, grouping and sorting. I pass to this method arrays that are used in sections like what is below. I am using a two dimensional filters array to hold the field and the string I am comparing it to. The condition array holds the Syncfusion.Grouping.Filters.FilterCompareOperator for that filter. This setup works great for adding multiple and filters, but I need to add a filter for all records where Status = x or y. How do I do that? I could not find any documentation on the FilterCompareOperators. What is Match? What is Custom? How do you use them? Thanks for your help. if (filters.Length > 0) { for(int x = 0; x< (filters.Length/2); x++) { if (filters[x,0]!= null) { table.RecordFilters.Add(filters[x,0].ToString(), condition[x], filters[x,1]); } // end if } // end x for } // end filters if

3 Replies

AD Administrator Syncfusion Team August 28, 2003 02:46 PM UTC

Match is for matching string with regular expression (we use Regex.IsMatch to compare the strings), Custom is intended to let you provide your own custom filter routine. I guess that is what you are looking for. But the bad thing is the "Custom" is not fully implemented yet in the preview. We'll support that in the beta. So, if the existing stock filter (And, Or and Operators) are not flexible enought then you need to wait for the beta and use the Custom operator filter. Thank you for your patience ... Stefan


GR Gregg Reed September 3, 2003 01:08 PM UTC

Do you have any documentation on using your filters. I can see that your FilterLogicalOperator Class has const for And and Or, but Your RecordFilterDescriptionCollection Class does not use it. It appears that all filters added with the RecordFilterDescriptorCollection.Add(String, FilterCompareOperator, object) are And filters. The RecordFilterDescription Class does use the FilterLogicalOperator Class, but it constructor does not take the object you are trying to compare. The best match is RecordFilterDescriptor(string, FilterLogicalOperator). There are four elements to this equation. The String, the FilterLogicalOperator (And/Or), the FilterCompareOperator (Equals/Like/..), and the object I am evaluating. I can not see a method that takes all into account and I have found no documentation explaining it yet. With the components you have I should be able to build a filter with the following logic: (Status = Open Or Active) And Profit > 10,000 Do you have any documentation describing how to build filters that include And and Or FilterLogicOperator’s. I would not think this would be a custom filter given that all the pieces seem to be in your Filters package. Thanks for you help. > Match is for matching string with regular expression (we use Regex.IsMatch to compare the strings), Custom is intended to let you provide your own custom filter routine. I guess that is what you are looking for. But the bad thing is the "Custom" is not fully implemented yet in the preview. We'll support that in the beta. > > So, if the existing stock filter (And, Or and Operators) are not flexible enought then you need to wait for the beta and use the Custom operator filter. > > Thank you for your patience ... > > Stefan


AD Administrator Syncfusion Team September 4, 2003 07:21 AM UTC

There is no grouping support documentation in the alpha code you are using. It is coming, but it is not ready yet.

Loader.
Live Chat Icon For mobile
Up arrow icon