I want to persist some filter expressions so that they can be reused in a dynamic way. But I have not been able to set the filtering expression dynamically. In my testing I thought that all I had to do was set the filterBy property of the grid to an appropriate expression and then rebind the grid. I have not had any luck doing this. Here is what I have tried.
The grid is using AJAX databinding.
I have a column named major and it has some values which begin with the characters MBA-
In the onDataBinding function:
var filterby = "major~startswith~'MBA-'";
var grid = $('#TestForFilteringGrid').data('tGrid');
grid.filterBy = filterby;