jQWidgets Forums

jQuery UI Widgets Forums Grid grid events

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  rama 11 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    grid events Posts
  • grid events #24265

    rama
    Member

    We have a grid where we support inline editing for some of the columns. we dont sent the updates as they change but we track all of them and with a click of a button we send all the changes. because of this we want to give a warning dialog if there are unsaved changes and the user tries to sort or page away from the current page. overriding the sort on source we show a warning if there are unsaved changes. but if i put the logiv in pager method on source, it is not getting called whne i select the next page. How do i get the event of changing the page so that i can warn the user if there are unsaved changes,

    grid events #24279

    Peter Stoev
    Keymaster

    Hi,

    For triggering page changes, use the “pagechanged” event.

    $("#jqxGrid").on("pagechanged", function (event) 
    {
    var args = event.args;
    var pagenum = args.pagenum;
    var pagesize = args.pagesize;
    });

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    grid events #24888

    rama
    Member

    This doesnt help. I receive the event but the page changes to the next page. What I need is a way to be notified before the event happens.
    This is what I need>

    1) The user can make several changes to values on the grid. I have a button which when clicked saves all the changes at once on the server.
    2) If the user tries to navigate to the next page with out saving his changes, I want to show a warning window. If they say discard changes, I want to go the page they want to navigate to. If they say no, don’t go to the next page.
    3) I was able to do it with sorting by implementing source.sort function.

    grid events #24894

    Peter Stoev
    Keymaster

    Hi,

    “pagechanged” is raised when a page is changed. That is the expected behavior. If you want to implement a different logic, then you should override the default paging as demonstrated in our “pager renderer” sample.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    grid events #24906

    rama
    Member

    when is the pager function on the source called?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.