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

Row Filter

Thread ID:





72473 Mar 20,2008 03:32 PM UTC Mar 25,2008 09:28 PM UTC WinForms 1
Tags: GridControl
James Gramosli
Asked On March 20, 2008 03:32 PM UTC

Hey guys,
I'm trying to get a chart which displays the same data as the grid, so to do this I need to get the row filter from the grid.

I havent been able to find the row filter property of a filtered row. I've resorted to writing something like this which loops through the RecordFilters collection of the table descriptor.
This is bound to cause bugs so I dont really want to use it, dont you guys have something somewhere that returns the DataView.RowFilter value? You have to do a similar construction of this string somewhere.

string rowFilter = String.Empty;
string valueFilter = String.Empty;
string seperator = String.Empty;
foreach ( RecordFilterDescriptor recFilter in gridTable.TableDescriptor.RecordFilters )
rowFilter += recFilter.LogicalOperator.ToString() + " " + recFilter.FieldDescriptor.Name + " IN( ";
//If its a string then wrap each value with '.
if ( recFilter.FieldDescriptor.FieldPropertyType == typeof( string ) || recFilter.FieldDescriptor.FieldPropertyType == typeof( DateTime ))
seperator = "'";
seperator = String.Empty;

foreach ( FilterCondition filtCond in recFilter.Conditions )
if ( !String.IsNullOrEmpty( valueFilter ) )
valueFilter += ",";
valueFilter += seperator + filtCond.CompareValue + seperator;
rowFilter += valueFilter + ") ";

Administrator [Syncfusion]
Replied On March 25, 2008 09:28 PM UTC

Hi James,

Thank you for your patience.

Please refer the code below to get the rowfileter of the GridGroupingControl.

DataView dv = new DataView(this.gridGroupingControl1.DataSource as DataTable);

Please let me know if this helps.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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