I need the jqgrid load data when it is ready.So I have a function named LoadData()
and bind click event for a button and write $("#btn").click()
It's not used when ready event down.
And when I click that button it's used.
I try make a timer of click event. It's used too. So I think When I use loadData
function, the jqgrid not ready. How could I know Jqgrid is all ready?
function LoadData() {
var PSCode = $("#sel_pollutant").val();
var RegionCode = $("#RegionCode").val();
$("#table_list_query").jqGrid('setGridParam', {
url: "TransferEfficiencvData.ashx",
datatype: 'json',
postData: { "Action": "TransferEfficiencv", "RegionCode": RegionCode, "PSCode": PSCode },
page: 1
}).trigger("reloadGrid");
}
$(function(){
var option = {
//jqgrid config
}
$("#table_list_query").jqGrid(option);
$("#btn").click(function () {
LoadData();
});
})