Datagrid Insert new

  • Thread starter Thread starter schapopa
  • Start date Start date
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
 
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
 
Back
Top