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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -