While I've been able to add my own post data programmatically, I cannot seem to figure out how to get this code to send _search: true
in the request.
var data = grid.jqGrid("getGridParam", "postData");
data._search = true;
data.searchString = id.toString();
data.searchOper = "eq";
data.searchField = "userid";
grid.jqGrid("setGridParam", { "postData": data });
grid.trigger("reloadGrid");
The fields are added correctly, but somewhere along the way _search appears to be set to false, because every request has it set to false. Is there some other thing I have to do to have it "true"? I'm running a toolbar search, but most of the time when this code will be called there's nothing entered, and a decent chunk of utility code on my server checks _search before handling searches.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…