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
20
igGrid mark row dirty
posted

I need to mark certain rows as dirty in order to catch them using igGrid("pendingTransactions"). Is it possible?

Parents
No Data
Reply
  • 16310
    Offline posted

    Hello Michel,

    You can use the _addTransaction() method to add elements to the pendingTransactions array:

    ds = $("#grid").data().igGrid.dataSource;

    var rowObject = $("#grid").igGrid("findRecordByKey", 4);

    ds._addTransaction(rowObject);

    or

    you can programmatically update a row with the same values using the update method. The method will also create a transaction and updates the UI, so you will find this row in the pendingTransactions array afterwards:

    var rowObject = $("#grid").igGrid("findRecordByKey", 4);

    $("#grid").igGridUpdating("updateRow", 4, rowObject);

    However I must note that I do not see why would you need to do this. If you clarify your scenario we can suggest a better approach if such exists.

Children