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

clear all the filter text

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dawson
Top achievements
Rank 1
Dawson asked on 13 Mar 2014, 01:05 PM
Hi
 i have a button. I want to clear all the filter text on click of that button.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Mar 2014, 01:16 PM
Hi Dawson,

Please try the following code snippet in the button click event.

C#:
protected void Button1_Click(object sender, EventArgs e)
{
  foreach (GridColumn col in RadGrid1.MasterTableView.Columns)
  {
   col.CurrentFilterFunction = GridKnownFunction.NoFilter;
   col.CurrentFilterValue = String.Empty;
  }
  RadGrid1.MasterTableView.FilterExpression = String.Empty;
  RadGrid1.Rebind();
}

Thanks,
Princy
Tags
Grid
Asked by
Dawson
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or