I would recommend you to implement export of data on the server and just post the current searching filter to the back-end. Full information about the searching parameter defines postData
parameter of jqGrid. Another boolean parameter of jqGrid search
define whether the searching filter should be applied of not. You should better ignore _search
property of postData
parameter and use search
parameter of jqGrid.
Format of the information about the searching filter depend on whether use used multipleSearch: true
option. I personally use it always. In the case the full information about the filter will be placed in one property of the postData
parameter: filters
property. The format is described here. The code which gets the information looks like the following
var $grid = $("#list"),
isFilterAreUsed = $grid.jqGrid('getGridParam', 'search'),
filters = $grid.jqGrid('getGridParam', 'postData').filters;
If you don't use multipleSearch: true
option you will be not able to use complex filters and the information about the filter will be placed in three properties of the postData
parameter: searchField
, searchOper
and searchString
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…