You can add a new DataRow to the DataTable, you can use a bindingContext or
BindingManagerBase and use the .AddNew() method. Is the grid supposed to be
read-only for everything but new Rows? I'm not sure if I'm understanding
correctly.
As far as updating goes, do you mean the Data in the DataBase? Since it's a
WinApp, I'm assuming your grid is bound to a DataTable. Any changes made
through the grid will be reflected in the DataTable. So you can simply call
DataAdapter.Update(yourTable) and provided you have update Logic , that's
all you should need. If you havne't used a DataAdapter Configuration
Wizard, you'll need to either use a CommandBuilder or roll out your own
stuff.
Either way, it's pretty straightforward. I'm not sure I understand the
problem, but if you can give me a little more detail, I can probably get you
through it.
Cheers,
Bill
"Jim" <NA> wrote in message news:ee****************@TK2MSFTNGP09.phx.gbl...
In my Win App, I have a datagrid that's bound to a dataset. When the form
loads, the datagrid fills. How can I add an empty row to the end of the
datagrid during a button click (similar to pressing Tab when mouse pointer
is on last field of last record of datagrid)? The datagrid's read-only so
the user won't be able to modify it unless he wants to add a new record
via the datagrid (by adding the empty row).
Also, if I modify the datagrid, how can I update the physical data? I only
have the dataset to
Thanks.