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.
Syncfusion Feedback

RecordFilterDescriptor and FilterCondition help

Thread ID:

Created:

Updated:

Platform:

Replies:

49479 Sep 20,2006 02:18 AM UTC Sep 20,2006 09:42 AM UTC Windows Forms 1
loading
Tags: Grouping
jamesb
Asked On September 20, 2006 02:18 AM UTC

I have the fllw RecordFilter. The intended behavior is SellingTitle=''AMOK'' AND Viewing > 0.

However, the filter is returning doing
SellingTitle=''AMOK'' OR Viewing > 0 because some Title being return have a Viewing=0.

Can you show me the syntax for doing someting like col1=''A'' AND col2=''B'' and col3=''C''?

fc = new FilterCondition(FilterCompareOperator.Equals, "AMOK");
rfd = new RecordFilterDescriptor();
rfd.Name = "Title";
rfd.Conditions.Add(fc);
this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(rfd);

fc = new FilterCondition(FilterCompareOperator.GreaterThan, 0);
rfd = new RecordFilterDescriptor();
rfd.Name = "Viewing";
rfd.Conditions.Add(fc);
this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(rfd);

Administrator [Syncfusion]
Replied On September 20, 2006 09:42 AM UTC

Hi James,

This is a default behaviour of the grid. You can change this behaviour by setting RecordFilters.LogicalOperator property to FilterLogicalOperator.Or. Try the below code snippet for the condition "''''AMOK'''' OR Viewing > 0".

FilterCondition fc = new FilterCondition(FilterCompareOperator.Equals, "AMOK");
RecordFilterDescriptor rfd = new RecordFilterDescriptor();
rfd.Name = "Title";
rfd.Conditions.Add(fc);

this.grid.TableDescriptor.RecordFilters.Add(rfd);

fc = new FilterCondition(FilterCompareOperator.GreaterThan, 0);
rfd = new RecordFilterDescriptor();
rfd.Name = "Viewing";
rfd.Conditions.Add(fc);

this.grid.TableDescriptor.RecordFilters.LogicalOperator = FilterLogicalOperator.Or;
this.grid.TableDescriptor.RecordFilters.Add(rfd);

Sample: http://www.syncfusion.com/Support/user/uploads/GGCUpdate_686fda30.zip

Let me know if you need any further assistance.

Thanks,
Haneef

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.

Warning Icon 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.Close Icon

;