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.
Unfortunately, activation email could not send to your email. Please try again.

RecordFilterDescriptorCollection Class

Thread ID:

Created:

Updated:

Platform:

Replies:

6798 Aug 28,2003 09:03 AM Sep 4,2003 03:21 AM Windows Forms 3
loading
Tags: GridControl
Gregg Reed
Asked On August 28, 2003 09:03 AM

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

Administrator [Syncfusion]
Replied On August 28, 2003 10:46 AM

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

Gregg Reed
Replied On September 3, 2003 09:08 AM

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

Administrator [Syncfusion]
Replied On September 4, 2003 03:21 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;