V
VJ
I have inherited from the DataTable and have my own custom table. In this
Custom DataTable class I want to be able to cancel any row delete operation,
instead mark the row with Flag as deleted. The Table will always have Field
"FLAG" to which I can assign "DEL" saying it was deleted. How do I make sure
the row is never deleted but only marked as deleted
public class myTable : DataTable
{
public myTable()
{
this.RowDeleting+=new
DataRowChangeEventHandler(InsphyDataTable_RowDeleting);
}
private void InsphyDataSet_RowDeleting(object sender,
DataRowChangeEventArgs e)
{
//Mark row as deleted
e.Row["Flag"] = "DEL";
// How do I cancel delete here?
}
}
Also I want to able to know the sequence.. is RowChanging fired first and
the Row Deleted... WHat is the order of below events
RowChanging
RowChanged
RowDeleteing
RowDeleted
Thanks
VJ
Custom DataTable class I want to be able to cancel any row delete operation,
instead mark the row with Flag as deleted. The Table will always have Field
"FLAG" to which I can assign "DEL" saying it was deleted. How do I make sure
the row is never deleted but only marked as deleted
public class myTable : DataTable
{
public myTable()
{
this.RowDeleting+=new
DataRowChangeEventHandler(InsphyDataTable_RowDeleting);
}
private void InsphyDataSet_RowDeleting(object sender,
DataRowChangeEventArgs e)
{
//Mark row as deleted
e.Row["Flag"] = "DEL";
// How do I cancel delete here?
}
}
Also I want to able to know the sequence.. is RowChanging fired first and
the Row Deleted... WHat is the order of below events
RowChanging
RowChanged
RowDeleteing
RowDeleted
Thanks
VJ