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. Image for the cookie policy date
close icon

Events grid grouping control

Hi
In my application i used Syncfusion grid grouping control to bind the data . now i need to know, what are the events fired when user filter the record using type header filter,b'cos if user filter the records means need to show the some propertise in my application . Reply ASAP


3 Replies

AA Arulraj A Syncfusion Team September 5, 2011 03:56 AM UTC

Hi Prabu,

Thank you for using Syncfusion Products.

You can handle the following events each of which provides the respective behavior as needed with respect to filtering.

//Filter about to start
this.gridGroupingControl1.TableDescriptor.RecordFilters.Changing += new Syncfusion.Collections.ListPropertyChangedEventHandler(RecordFilters_Changing);

//Filtering completed
this.gridGroupingControl1.TableDescriptor.RecordFilters.Changed += new Syncfusion.Collections.ListPropertyChangedEventHandler(RecordFilters_Changed);

//Occurs when a record is checked for meeting filter criteria
this.gridGroupingControl1.QueryRecordMeetsFilterCriteria += new QueryRecordMeetsFilterCriteriaEventHandler(gridGroupingControl1_QueryRecordMeetsFilterCriteria);



void RecordFilters_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
//Console.WriteLine("Filtering Completed......");
Console.WriteLine("Filter Count:"+this.gridGroupingControl1.TableDescriptor.RecordFilters.Count);
}

void RecordFilters_Changing(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
Console.WriteLine("Filtering Started.....");
}


void gridGroupingControl1_QueryRecordMeetsFilterCriteria(object sender, QueryRecordMeetsFilterCriteriaEventArgs e)
{
Console.WriteLine("Filtering Going on......");
}


To get the filtered record count you are in need to get it from the GridTable object. The following code illustrates the same.

void RecordFilters_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
if (e.Action == Syncfusion.Collections.ListPropertyChangedType.Refresh )
{
Console.WriteLine("Filter Count:" + this.gridGroupingControl1.Table.FilteredRecords.Count.ToString());
}
}

Let me know if you have any further concerns.

Regards,
Arulraj.A




JZ Jesus Zuñiga February 28, 2018 02:15 PM UTC

I agree


AR Arulpriya Ramalingam Syncfusion Team March 1, 2018 11:02 AM UTC

Hi Jesus, 
 
Okay, kindly revert us if you need any further assistance. 
 
Regards, 
Arulpriya 


Loader.
Live Chat Icon For mobile
Up arrow icon