yes its possible
there is property called allownewrow make it true.
and then write a update command.suppose ur using a dataapater
sqldataadapte da=new sqldataadapte ("select* from table ", conn);
datatable dt=new datatable();
da.Fill(dt);
datagrid.source=dt;
sqlcommandbuilder cbd=new sqlcommandbuilder(da);
da.update(dt);
Note:- if there is primary key in the table and u are accessing that primary
key in select command .then u can use sqlcommandbuilderwhich will
automatically generate the updtae insert and delete command.
if there is no primary key in table then u need to write ur own update
command.
"vbtrying" wrote:
Is it possible to add a new row programmatically to a datagrid, then store
the new row data to the database? My app needs to prompt the user to add a
new row - fill in the required fields in the datagrid - then store that data
to the database.
Thanks