The help documentation in Extjs contains some simple queries. grid paging queries only include parameters such as start, limit, sort, and dir by default, but in actual situations, you may need to input custom parameters, I tried it many times but did not publish it.
Find a method on the Internet and use the beforeload event of JsonStore to forcibly Add a custom parameter list. The key code is as follows:
Var ds = new Ext. data. JsonStore ({ Url: "../Handlers/PageHandlerPage. aspx ", // Url: "../Handlers/PageHandler. ashx ", Root: "root ", TotalProperty: "totalProperty ", Id: "id ", BaseParams: {id: Ext. get ("txtId"). dom. value, name: Ext. get ("txtName"). dom. value }, Fields: ["id", "name", "descn" ], RemoteSort: true }); Ds. on ("beforeload", function (thiz, options ){ // Debugger Thiz. baseParams ["id"] = Ext. get ("txtId"). dom. value; Thiz. baseParams ["name"] = Ext. get ("txtName"). dom. value; }); |