A
ad
I want to delete a DataRowView in a DataView if the DataRowView not checked
OK.
(CheckRow is a function for checking )
I used the codes below:
But when some row is delete, it fail , the error message is
Collection was modified; enumeration operation may not execute.
How can I do that?
----------------------------------------------------------------------------
----------------------------------
foreach (DataRowView drv in myDataView)
{
if ( !CheckRow(drv) )
{
drv.Delete();
}
}
OK.
(CheckRow is a function for checking )
I used the codes below:
But when some row is delete, it fail , the error message is
Collection was modified; enumeration operation may not execute.
How can I do that?
----------------------------------------------------------------------------
----------------------------------
foreach (DataRowView drv in myDataView)
{
if ( !CheckRow(drv) )
{
drv.Delete();
}
}