I am using Js grid. I need to update changed the records when the next page is clicked.

I have tried the following code.

<div id="grid"></div>
    <div id="externalPager" class="external-pager">
    <button type="button" id="btnPrevious" class="btn btn-grey">Previous</button>
    <button type="button" id="btnNext" class="btn btn-grey">Next</button>
</div>

This is my js

$j("#grid").jsGrid({
    height: "400px",
    width: "100%",

    //Data Manipulation
    sorting: false,
    paging: true,
    pageSize: 5,
    //pagerContainer: "#externalPager",
    //pageIndex: 1,
    autoload: true,
    editing: true
});

I need to call the controllers to save function when the next page button is clicked. For example, If I am moving from Page 1 to Page 2. And some row values are changed in Page 1 and the user doesn't click save button and instead click Page 2, I want the Changed records (rows) in the Page 1 to be updated before moving to Page 2

0 Answers