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
Add then delete row client side not working
posted

I am using a webgrid where the user can add, edit and delete rows on the client. The grid will be updated using a sqldatasource when a postback occurs (addrowbatch/deleterowbatch events). 

Everything is working fine with the following exception:  If a user adds a new row and then deletes that row the insert is still performed on postback resulting in the row reappearing in the grid.  Surely the addrowbatch event should not fire for this row as it has been deleted?  

Surely someone has come accross this before - is this a bug with webgrid?  Is there a simple workaround?  It seems pretty daft that webgrid fails on what is a fundamental part of its functionality so I hope I am missing something!

Any help much appreciated..

Thanks

Doug