joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

multiple grid on same page and filtering #98

Open codeweb opened 7 years ago

codeweb commented 7 years ago

Scenario: two grids on the same page (prefixes already configured) and one filter which must filter a column present in both grid. The parameter name in the url will take the name of the first grid.

joeharrison714 commented 7 years ago

try calling MVCGrid.setFilters on both grids when you want to trigger the filtering.


       $('#filterButton').click(function () {
            MVCGrid.setFilters('Grid1', { LastName: 'Smith' })
            MVCGrid.setFilters('Grid2', { LastName: 'Smith' })
        });```
codeweb commented 7 years ago

No, in that way i will have duplicate parameters because i have grid with prefix. Moreover some filters are not column of the grid (so i need AdditionalQueryOption). Why can't i use in a grid AdditionalQueryOption of the other grid (with prefix)?