The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team August 28, 2003 09: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
GRGregg ReedSeptember 3, 2003 08: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
ADAdministrator Syncfusion Team September 4, 2003 02:21 AM
There is no grouping support documentation in the alpha code you are using. It is coming, but it is not ready yet.