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

[Solved] filters during postback on client-side databinding

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
M van der Kolk
Top achievements
Rank 1
M van der Kolk asked on 13 Nov 2009, 03:04 PM
Am I right that filters set on a client-side databound radgrid are not preserved during a postback?

Currently I have my own buttons to set a filter on the grid. When I press one of the buttons, this client-side function is called:
function actionFilter(obj, value) 
    var tableview = grid.get_masterTableView(); 
    tableview.filter('Action', value, 'EqualTo'); 
     

I have one column which causes a postback. After the postback, the filter is gone and all records are shown. So if I want to preserve the filter, I have to save it programmatically?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Nov 2009, 06:21 AM
Hello Patrick,

A possible approach is to save the filter expression onto a viewstate or session variable or any other similar instance and then load the filter expression in the Page PreRender event or so inorder to save filtering on postback. For better guidance, you can refer to this link and you can alter the logic according to your requirement.
Saving grid settings on a per user basis

hope this helps..
Princy.
Tags
Grid
Asked by
M van der Kolk
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or