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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to apply Filters to Grid Grouping Control

Thread ID:

Created:

Updated:

Platform:

Replies:

60212 Apr 30,2007 06:09 PM UTC May 1,2007 04:05 PM UTC WinForms 2
loading
Tags: Grouping
Uma Datla
Asked On April 30, 2007 06:09 PM UTC

Hi,

I am using RecordFilterDescriptor to filter the records in Grid Grouping Control(version 4.202.0.60) . I have two filters i.e ShowAllRecords, ShowRecordsWithStatCode 1. The first filter shoud show all records but when I apply the first filter after the second filter the grid is only showing only few records. Please help me with this issue. The Grid Grouping Control has nested tables with relations

public void UpdateFilters()
{
if (this.ShowAllExcps)
{
StatFilterDescriptor.Expression = "";
DTableDescriptor.RecordFilters.Remove("EXCPSTATUSFILTER");

}
else
{
//To filter the records that with Status code as 1.
StatFilterDescriptor.Expression = "[STAT_CODE] = 1";
DTableDescriptor.RecordFilters.Add(ExcpStatusFilterDescriptor);
}

this.gridGroupingControl1.Refresh();
}

haneefm [Syncfusion]
Replied On April 30, 2007 11:56 PM UTC

Hi Uma,

To filter the data in the GridGroupingControl, create an instance of a RecordFilterDescriptor and add it to the RecordFilters collection in the TableDescriptor. The RecordFilterDescriptor will allow you to specify a string that holds a logical expression using any of the other fields in the data.

[C#]
// Adds a record filter that requires Col1 to be less than 4.
RecordFilterDescriptor rfd = new RecordFilterDescriptor("[Col1] < 4");
this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(rfd);

Also refer the following browser sample under the FiltersAndRelationship category ( C:\Program Files\Syncfusion\Essential Studio\4.4.0.49\Windows\Grid.Grouping.Windows\Samples\FiltersAndExpressions\ )for more details.
FilterTutorial Sample-This sample demonstrates the creation of filters at design time.
Filter Sample -Filters can be set by setting the ShowFilterBar and allowFilter property. The AllowFilter can be set for the columns that require filter options.

Best regards,
Haneef

Uma Datla
Replied On May 1, 2007 04:05 PM UTC

Hi Haneef,

Thanks for the reply. I have already looked in to the sample that you mentioned below. As you suggested I have set the Allowfilter for the column that requires filters. In my screen the filters are working but in the Grid the filtered rows are overlapping the other rows as shown in the screen shot. I have called this.gridgroupingControl.refresh() after adding filters; Please see the attachments for more details. I think the issue is with grid redraw after applying filters Please help me with this issue.













>Hi Uma,

To filter the data in the GridGroupingControl, create an instance of a RecordFilterDescriptor and add it to the RecordFilters collection in the TableDescriptor. The RecordFilterDescriptor will allow you to specify a string that holds a logical expression using any of the other fields in the data.

[C#]
// Adds a record filter that requires Col1 to be less than 4.
RecordFilterDescriptor rfd = new RecordFilterDescriptor("[Col1] < 4");
this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(rfd);

Also refer the following browser sample under the FiltersAndRelationship category ( C:\Program Files\Syncfusion\Essential Studio\4.4.0.49\Windows\Grid.Grouping.Windows\Samples\FiltersAndExpressions\ )for more details.
FilterTutorial Sample-This sample demonstrates the creation of filters at design time.
Filter Sample -Filters can be set by setting the ShowFilterBar and allowFilter property. The AllowFilter can be set for the columns that require filter options.

Best regards,
Haneef


Filters.zip

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

;