Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Accept Row Changes

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Accept Row Changes
Link Posted: 03-Mar-2006 23:42
Greeting,

how can I accept row changes in a bound flygrid? In the edited row is always a pancel, but I have accept the data changes in the datatable.

Best regards
Link Posted: 07-Mar-2006 16:45
1. Use FlyGrid.Rows.UpdateMode for the update datable.
There are two modes to receive notifications about updating datasource:
[list]
  • OnCellChangedOrLostFocus - Changed data will updated after changed in the cell of node or after FlyGrid lost focus.
  • [/*:m]
  • OnRowChangedOrLostFocus - Changed data will updated after focused row changed or after FlyGrid lost focus.
  • [/*:m][/list:u]
    Here is example of usage (used UpdateMode = OnRowChangedOrLostFocus):
    [c#]
    public bool UpdateRowDataHandler(object sender, int position)
    {
    try
    {
       //you can analyze datarow -
       // Rows rows = sender as Rows;
       // DataTable dt = rows.DataSource as DataTable
       // DataRow dr = dt.Rows[position]
       // dr.AcceptChanges();
       myDataSet.AcceptChanges();
       return true;
    }
    catch
    {
        return false;
    }
    }