Hi Marc,
You might use DataTable.RowChanged event?
Use this code, for example:
if (e.Action == DataRowAction.Add)
e.Row["Guid"] = Guid.NewGuid();
--
Miha Markic [MVP C#]
RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
"Marc" <(E-Mail Removed)> wrote in message
news:FBBB3462-C2E7-4122-B71C-(E-Mail Removed)...
>I would like to set up a DataColumn in my table of type Guid and a new
> Guid(Guid.NewGuid) would be the expression that gets evaluated when ever a
> new row was added. I have the DataSet bound to a grid so I would like to
> set
> this up at compile time. The Guid DataColumn is also the primary key so
> it
> has to be set when a row is added.
>
> Thanks,
> Marc