Datagrid Insert new

S

schapopa

Hi Everybody,

I have a datagrid and I am using sqlcommandbuilder for update and insert
of the data.

I have two questions related to insert new row in datagrid.
When I get to the new row how can I make first column(which is my
primary kay) filled with some value??
Second, how can I add new row to the datagrid by using the button on the
bottom. What is the even for the datagrid.

Thank you
Schapopa
 
K

Ken Tucker [MVP]

Hi,

Take a look at the datacolumn defaultvalue and autoincrement
properties

http://msdn.microsoft.com/library/d...ystemdatadatacolumnclassdefaultvaluetopic.asp

http://msdn.microsoft.com/library/d...stemdatadatacolumnclassautoincrementtopic.asp

http://msdn.microsoft.com/library/d...datadatacolumnclassautoincrementseedtopic.asp

http://msdn.microsoft.com/library/d...datadatacolumnclassautoincrementsteptopic.asp

Ken
----------------------
<schapopa> wrote in message Hi Everybody,

I have a datagrid and I am using sqlcommandbuilder for update and insert
of the data.

I have two questions related to insert new row in datagrid.
When I get to the new row how can I make first column(which is my
primary kay) filled with some value??
Second, how can I add new row to the datagrid by using the button on the
bottom. What is the even for the datagrid.

Thank you
Schapopa
 

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