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
iggrid delete row after click delete button

I'm using an igGrid where I have a delete button:

When I click this button, this item is deleted in the DB. Is there a way to also delete this item in this table using AJAX (in the success) without having to refresh the page?

  • 485
    Offline posted

    Hello Ronny,


    Thank you for posting in our forum.


    In case you have not set the “autoCommit” option to “true”, the igGrid would not commit the pending transactions to the UI automatically - if you delete a row from the data source (on the client side), the grid would strikethrough the text and change its color in order to notify you the row has been deleted. Here is a sample screenshot:



    If you want to commit the pending transaction (in your case - deletion of a row) and update the UI, try calling the “commit” API method in the AJAX “success” callback.


    As I notice you use some custom templating for the last column, I would appreciate if you elaborate some more on the way you delete the row and when does it happen – is it after the call to the DB? If that is the case, then you would want to first call the “delete” API method, and then “commit” the transaction.

    Another possible approach would be to set “autoCommit” to true in the grid options – that way you would not have to call the “commit” method manually - it depends on your scenario and the requirements that you have.


    Please let me know if you need any further assistance or if you have some additional questions.

Reply Children