jquery - jqGrid prevent pager navigation? -


we use custom formatter output html form text boxes. in case user has entered in data , hit next/prev button, want tell them "you've edited data, hit ok stay on page , save data". how can this?

the 'onpaging' event fires when use pager doesn't seem let prevent pagination occuring.


update: current workaround:

var currpg = 1; var dirty = 'false';     $("#list").jqgrid({     ...     onpaging: function (b) {         var nextpg = $("#list").getgridparam("page");          if (dirty == 'false') {            currpg = nextpg;            return;         }           $( "#dialog-confirm" ).dialog({         modal: true,         buttons: {             "stay on current page": function() {                 $( ).dialog( "close" );             },             "change page": function() {                 $( ).dialog( "close" );                 reloadgrid($("#list"), null, nextpg, 'false');             }         }         });          $("#list").setgridparam({page:currpg}); //workaround - jqgrid still increments page num when return stop have reset (and track current page num)             return 'stop';     }, 

update 2: bug logged here.

if function onpaging returns 'stop' pagination stopped.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -