jQWidgets Forums

jQuery UI Widgets Forums Grid Delete last record of a page

Tagged: 

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Delete last record of a page #55427

    scamiros
    Participant

    There’s a problem when I delete the last record of a page.
    although I call
    $("#jqxgrid").jqxGrid('updatebounddata')
    the grid still remain in the current page that is empty.

    Any solution?

    Delete last record of a page #55428

    Peter Stoev
    Keymaster

    Hi scamiros,

    To change the page’s number, you should use gotopage method. “deleterow” does not automatically navigate to previous or next pages. Its purpose is to delete a row. “updatebounddata” is not related, too, as It rebinds the Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Delete last record of a page #55430

    scamiros
    Participant

    Thanks,
    but I need a control to know if the current deleted row is the last of that page, so I can call gotoprevpage.
    Is there a way to know the number of rows of particular a page?

    Delete last record of a page #55431

    Peter Stoev
    Keymaster

    Hi scamiros,

    Get the rows count through the getrows method which returns an array and each array has length member. Then get the current page’s number and size thorugh the getpaginginformation method and I suppose you have all the data to calculate whether you need or not to call the gotoprevpage method.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Delete last record of a page #55432

    scamiros
    Participant

    Thanks Peter,
    it works very well!!

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

You must be logged in to reply to this topic.