Hi,
[quoted text, click to view] "Leon_Amirreza" <amirreza_rahmaty@yahoo.com> wrote in message
news:eE6FVEz%23GHA.3952@TK2MSFTNGP03.phx.gbl...
>I have attached this handler
How did you implement the handler ?
[quoted text, click to view] > but when the user goes to the last (empty) row of the grid and then leaves
> this fake data row an error is reported and DataGrid does detect that the
> user hasnt entered any value and the row should be dissmissed!?
>
If the user enters the empty row and then leaves without entering any data
then the row should be dismissed and attaching an eventhandler to
TableNewRow for setting a new guid doesn't seem to prevent this.
And are you using a DataGrid or DataGridView ?
HTH,
greetings
[quoted text, click to view] > how to correct this problem?
>
> "Bart Mermuys" <bmermuys.nospam@hotmail.com> wrote in message
> news:R790h.150224$Lj6.2582627@phobos.telenet-ops.be...
>> Hi,
>>
>> "Leon_Amirreza" <amirreza_rahmaty@yahoo.com> wrote in message
>> news:Ol1XaNM%23GHA.3352@TK2MSFTNGP03.phx.gbl...
>>>I have a column named "ID" and its type is "uniqueidentifier" in SQL
>>>Server 2005 Express.
>>> this column is the primary key and its default value is "newid()" in SQL
>>> Server.
>>>
>>> I have generated a DataSet in C# that has this column but its default
>>> value is DBNull what can I do to make the default value be the return
>>> value of this function ( or I want the Id be generated by default in the
>>> DataSet)?
>>
>> If you are using VB/VC#2005 then attach an eventhandler to
>> DataTable.TableNewRow to set a Guid.NewGuid.
>>
>> HTH,
>> Greetings
>>
>>>
>>> System.Guid.NewGuid()
>>>
>>
>>
>
>