javascript - Jqgrid not reloading after 1st dropdown index chnage method -
i have created jqgrid on dropdown index change event..
$("#dropdown").on('change', function () { $("#datagrid").jqgrid({ url: 'default.aspx/callme' ... });
this works fine 1st dropdown index change event. how jqgrid reloaded on every index change event of dropdown. url seems not getting hit on next index change event.
i think 1 important misunderstanding exists. original page contains empty <table id="datagrid"></table>
. after call
$("#datagrid").jqgrid({ url: 'default.aspx/callme' ... });
it converted relatively complex structure of grids on divs. one can create grid once. @ second call jqgrid makes small test. because grid created makes return
, nothing.
if want reload data server should use $("#datagrid").trigger("reloadgrid");
. if need change column header , other parts of grid can recreate grid usage $("#datagrid").jqgrid("gridunload");
before $("#datagrid").jqgrid({...});
. see corresponding demo in the old answer.
Comments
Post a Comment