Insert Row in Datagrid

V

vynerd

Hi,

I am trying to let the user add a row in the datagrid and enter in the
data. The new row shows up, but the user cannot edit it.

DataTable dt = (DataTable)grid.DataSource;
DataRow dr = dt.NewRow();
dt.Rows.InsertAt(dr, grid.CurrentRowIndex);
dt.AcceptChanges();

Also, I cannot delete the new row that was made by the user.

Thanks
 

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