To add some details:
OnCurrentCellChanged should be overridden to determine when the user is
moved to the next row.
Then the row state should be analyzed, and if the underlying data row has
been changed, changes should be propagated to the database.
Current underlying data row can be obtained like this:
CurrencyManager cm = (CurrencyManager)grid.BindingContext[grid.DataSource,
grid.DataMember];
DataView view = (DataView)cm.List;
DataRow currentRow = view[grid.CurrentCell.RowNumber].Row;
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Unit Testing and Integration Environment
http://x-unity.miik.com.ua
Deliver reliable .NET software
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:en*************@tk2msftngp13.phx.gbl...
Nanda,
In this case, you will have to hook into the grid and catch when the
row changes. When this happens, you will have to access the data adapter that
created the data set that the grid bound to, and pass the data set to the
adapter through the Update method.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com
"Nanda" <cs******@yahoo.co.in> wrote in message
news:0a****************************@phx.gbl... hi,
i have an editable datagrid. how can i update the
database, When the user completes entering data for a row.
i.e., data should be updated whenever user completes
entering a row.
Thanks in advance.