From: Paul on
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
From: Alberto Poblacion on
"Paul" <gambamia2(a)yahoo.es> wrote in message
news:e87c32bb-9f35-4201-9d0c-e090f2488b97(a)n34g2000yqb.googlegroups.com...
> 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
}
}