Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
585
Cancel deleteRow
posted

My igGrid is initialized as autoCommit = false. Doing deleteRow() will cross out the entire row. Is there a way that I can cancel my delete action at this point prior to save changes? As the Done and Cancel buttons are unavailable for a row that is being deleted.

Thanks!

Parents
No Data
Reply
  • 23953
    Verified Answer
    Offline posted

    Hi Erica,

    You can do this manually.

    First you need to remote the ui-iggrid-deletedrecord css class from the grid row.

    Next you need to rollback the delete transaction from the grid data source.

    Here is an example function:

     

    Code Snippet
    1. function rollbackDelete(rowId) {
    2.     $("#grid1>tbody>tr[data-id=" + rowId + "]").removeClass("ui-iggrid-deletedrecord");
    3.     $("#grid1").data("igGrid").dataSource.rollback(rowId);
    4. }

     

    Hope this helps,

    Martin Pavlov

    Infragistics, Inc.

Children
No Data