javascript - Is there an event "on Refresh" for jqgrid navgrid -
i try find how trigger event before grid refresh itself. need "onsearch" reset button.
here code navgrid :
$("#jqgrid").jqgrid('navgrid','#jqgridpager' ,{edit: false, add: false, del: false, search: true, refresh: true},// button of footer : search , refresh {}, // settings edit {}, // settings add {}, // settings delete { onsearch:function(){/*... first action ... */}, /* here : afterrefresh: function(){console.log("refresh?");}, */ multiplesearch:true, overlay:false, sopt: ['eq'] } // search options );
does has idea and/or documentation navgrid events?
thanks
you can use beforerefresh
, afterrefresh
:
$("#jqgrid").jqgrid('navgrid','#jqgridpager', {edit: false, add: false, del: false, search: true, refresh: true, beforerefresh: function(){console.log("beforerefresh");}, afterrefresh: function(){console.log("afterrefresh");}}, {}, // settings edit {}, // settings add {}, // settings delete { onsearch:function(){/*... first action ... */}, multiplesearch:true, overlay:false, sopt: ['eq'] } // search options );
it's important understand navgrid
add buttons in navigator bar. calls other methods of jqgrid on click on buttons. options see in "searching" block options of searchgrid method, navgrid
use on click on "searching" button. there no refresh method, there exist "reloadgrid" event. navgrid
calls callbacks beforerefresh
, afterrefresh
itself. it's reason why beforerefresh
, afterrefresh
specified other options of navgrid
.
Comments
Post a Comment