Suscribe event of deleted in a datatable

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi,
I created a Dataset with Wizard of visual studio 2008 from a database.
I want to subscribe to the event of removal of a table, but can not.
Any ideas?

Thanks
 
Paul said:
I created a Dataset with Wizard of visual studio 2008 from a database.
I want to subscribe to the event of removal of a table, but can not.

DataSet ds = new MyDataSet();
ds.Tables.CollectionChanged += new
CollectionChangeEventHandler(myEventHandler);
....

private void myEventHandler(object sender, CollectionChangeEventArgs e)
{
if (e.Action==CollectionChangeAction.Remove)
{
//Insert code here
}
}
 
Back
Top