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
1250
Remove row on client side
posted

Please help with following problem:

On the client I add new row, after that I want to remove this row.

Scenario is following:

1. User clicks some button, new row is added.

2. Later user clicks Cancel button, I want to remove previosly added row.

I don't need any postbacks or other actions. 

I do following:

myAddedRow.get_grid().get_rows().remove(myAddedRow);

But this doesn't remove row, just marks it as deleted, the button "Undo" is shown in the grid.

How can I completely remove this row?

Please help, using UltraWebGrid it was a default behavior.

Alexander

Parents
  • 33839
    Suggested Answer
    posted

    Hi Alexander,

    It sounds like you have batch updating on.  If you have added a row on the client and not yet had it commited and then want it completely removed, you should call editingCore.undoBatchUpdate(row);  This will completely remove it.  If the row was already there, it will just mark it for deletion.  You could set the DeletedRow role to have display none or something.  That may work.

    regards,
    David Young 

     

Reply Children