Hi Folks,
Can anyone help us on adding Saved Filters?
We have Filter Templates configured and working, see code snipet below.
Looking to add ability for users to create, update, update and delete (crud) filters and save changes on server side.
Looking on methods push or pop tmplNames and tmplFilters.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
; //this code retuerns the current filter in use var currentfilter = $("#jqGrid").jqGrid('getGridParam','postData').filters; //this is our setup for templNames and tmplFilters $(#jqGrid).navGrid(#jqGridPager, { ... multipleSearch: true, multipleGroup: true, showQuery: true, tmplNames: [Template One, Template Two], tmplFilters: [template1, template2], ... }); var template1 = { "groupOp": "AND", "rules": [ { "field": "Account", "op": "eq", "data": "XYZ" }, { "field": "Name", "op": "cn", "data": "Smith"} ] }; var template2 = { "groupOp": "AND", "rules": [ { "field": "Name", "op": "eq", "data": "Carnes" }, { "field": "OrderID", "op": "le", "data": "10255"} ] }; |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top