Greetings,
I have a strongly typed dataset and when I write the identity column to the
database, I set it and retrieve it. This works fine.
Now I want an event to trigger for each record that is set and retrieved
from the DataSet to update the children of the DataSet with the new identity
column.
The DataSet Created two Classes for the Products Class called
ProductsRowChangeEvent - and -
ProductsRowChangeEventHandler
which will probably do the trick if I knew how to use them, or could find
some documentation on these two Classes.
Any thoughts would be greatly appreciated.
-Devon
William Vaughn - 07 Mar 2008 00:44 GMT
It seems to me I discussed this in my article posted to Developer.Com. See
the article on using the TableAdapter for Hierarchical ops.

Signature
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
> Greetings,
>
[quoted text clipped - 18 lines]
>
> -Devon
Devon-S - 07 Mar 2008 01:44 GMT
William,
I just read Hierarchical TableAdapter 301 and it wasn't in there. Was there
another reference?
Devon
> It seems to me I discussed this in my article posted to Developer.Com. See
> the article on using the TableAdapter for Hierarchical ops.
[quoted text clipped - 21 lines]
> >
> > -Devon
Cor Ligthert[MVP] - 07 Mar 2008 04:57 GMT
Devon,
Just use the DataSet has changes, although that is even not needed, there
will no rows be updated by a "DBDataAdapter.Update" as long as a row has no
changed rowstate.
Cor
Cowboy (Gregory A. Beamer) - 07 Mar 2008 16:32 GMT
Good starting point is the MSDN documentation. This is for DataTable:
http://msdn2.microsoft.com/en-us/library/system.data.datatable.rowchanging.aspx
There is no row changing events on the DataSet itself.

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
*************************************************
> Greetings,
>
[quoted text clipped - 18 lines]
>
> -Devon
Devon-S - 07 Mar 2008 17:42 GMT
Greg,
Thanks. I also figured out how to wire up the typed dataSet Event. It is one
of those things that once ya do it, it is very simple.
TypedDataSet.DataTable.DataTableRowChanged += <at this point VS2005 bring up
the right thing and suggests you hit Tab> so you get for Products DataTable
in NorthWind DS
NorthWind.Products.ProductsRowChanged += ProductsRowChangedEventHandler(
<and at this point Visual Studio asks if you want the method made for you>)
Which then you have
NorthWind.Products.ProductsRowChanged +=
ProductsRowChangedEventHandler(Products_ProductsRowChanged)
void Products_ProductsRowChanged(object sender ProductsRowChangedEvent e)
{
}
Then I tested the code it works just like you would think. When something
changes it passes the changes to this event and you can access the row with
e.Row.
Thanks for leading me towards it...
Devon
> Good starting point is the MSDN documentation. This is for DataTable:
> http://msdn2.microsoft.com/en-us/library/system.data.datatable.rowchanging.aspx
[quoted text clipped - 26 lines]
> >
> > -Devon
Cowboy (Gregory A. Beamer) - 12 Mar 2008 14:43 GMT
Glad I could point in the right direction. I assume this is either in
library code or your page events. If you ever directly alter the DataSet
(not necessary in 2.0 and later as you can extend in your own class, make
sure you document, as someone might go and regen the DataSet if there is a
schema change and blow your required bits out of the water.

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
*************************************************
> Greg,
>
[quoted text clipped - 63 lines]
>> >
>> > -Devon