Add GUID Column in datagrid

M

Melson

Hi

I've created a GUID column of a table in ms sql server and bind the table to
a datagrid. How can I automatically create new GUID when i add new row in
the datagrid.

Pls help. Thanks.

Regards
Melson
 
T

Terry Burns

If the table is bound, add the row to the table.

Dim g As New Guid
Dim dg As New DataGrid
Dim t As New DataTable
Dim c As New DataColumn("MyGuid")
Dim r As DataRow = t.NewRow()

t.Columns.Add(c)
r(0) = g
t.Rows.Add(r)
 
K

Ken Tucker [MVP]

T

Terry Burns

I just think we should

Freeeeeeee, eeeeeeee, eeeeeeeeeeeeeee, eeeeee,
eeeeeeeeeeeeeeeeeeeeehhhhhhhhhhhhhhhhhhhhhhhhhh

'Melson' Mandeeellllllllaaaaaaaaaaa, ahhhhhhhhhha, ahhhhhhhhhhhh


Sorry, could not resist that !

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top