Prevent to removing row from DataTable
-
Hellow, ho do i can to prevent removing row from DataTable. I.e. when row are being removed by user, i need to validate this action and only after this remove this row or cancel this if neccessary. I can't use RowDeleteing event because this one can't prevent row deletion if needed, such as only way to do this (as i know) is throw an exception and catch one by myself. But in my code i can't controle exception what throw my DataTable. Thank.
-
Hellow, ho do i can to prevent removing row from DataTable. I.e. when row are being removed by user, i need to validate this action and only after this remove this row or cancel this if neccessary. I can't use RowDeleteing event because this one can't prevent row deletion if needed, such as only way to do this (as i know) is throw an exception and catch one by myself. But in my code i can't controle exception what throw my DataTable. Thank.
Extend base datatable creating a new event on datarow remove
Visit my blog at http://dotnetforeveryone.blogspot.com