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

[Solved] Custom buttom filter

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AereoN
Top achievements
Rank 1
AereoN asked on 20 Nov 2009, 09:29 AM
I've been using this code on javascript to perform filtering on key press.
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("Name", sender.get_value(), "Contains");

But can anyone tell me how to do I archive this on code behind via a button?



1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Nov 2009, 10:46 AM
Hi,

You have to set the filterexpression of the grid manually. Check out the following online demo which illustrates how to implement filtering on a button click:
Web Mail Grid

Also you can try the same approach given in the following document on the button's click event:
Applying default filter on initial load

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