This is a migrated thread and some comments may be shown as answers.

How to get column when filtering

1 Answer 46 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Weiqi
Top achievements
Rank 1
Weiqi asked on 02 Jul 2010, 08:36 AM
hello,

i attached the event

 this.Filtering += new System.EventHandler<GridViewFilteringEventArgs>(OnFiltering);
 void OnFiltering(object sender, GridViewGroupingEventArgs e)
{
 }

how can i get which column is be filtering now?
it's better that i can get the column information (GridViewDataColumn)


Thanks

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 02 Jul 2010, 09:07 AM
Hello Weiqi,

You can use the e.Added property to get access to the newly added filter descriptors.

void radGridView1_Filtering(object sender, GridViewFilteringEventArgs e)
{
    // e.Added contains all new filter descriptors
    var filterDescriptor = e.Added.First() as FilterDescriptor;
  
    var filterProperty = filterDescriptor.Member;
}


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Weiqi
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or