M
Mike Edenfield
I'm still having problems with the RowChanged event on the DataTable. I
need to find an event which runs after a new DataRow has been added to
the DataTable's Rows[] collection. Clearly, RowChanged() is not that
event, since the "e.Row" event argument is not in it's own DataTable's
Rows[] collection.
The following code demonstrates my problem:
private void RowChanged(object sender, DataRowChangeEventArgs e)
{
MyDataSet.MyRow row = e.Row as MyDataSet.MyRow;
DataRow[] rows = e.Row.Table.Select("ID = " + row.ID);
if ( rows.Length == 0 ) MessageBox.Show("Where's my new row?");
}
What am I missing?
--Mike
need to find an event which runs after a new DataRow has been added to
the DataTable's Rows[] collection. Clearly, RowChanged() is not that
event, since the "e.Row" event argument is not in it's own DataTable's
Rows[] collection.
The following code demonstrates my problem:
private void RowChanged(object sender, DataRowChangeEventArgs e)
{
MyDataSet.MyRow row = e.Row as MyDataSet.MyRow;
DataRow[] rows = e.Row.Table.Select("ID = " + row.ID);
if ( rows.Length == 0 ) MessageBox.Show("Where's my new row?");
}
What am I missing?
--Mike