Home Forums WinForms controls Xceed Grid for WinForms Insertionrow cancel Reply To: Insertionrow cancel

User (Old forums)
Member
Post count: 23064

This was only a basic implementation, and you need to increment on it, so it works as you need in all scenarios.  For example, once the InsertionRow enters edition, the IdleValue of insertion cells are discarded, and the underlying DataRow  is created, so you need to set the Value property on each cell.  To do this, you need to handle the EditBegun event on the InsertionRow.

e.g.:

    void insertionRow1_EditBegun( object sender, EventArgs e )
    {
      InsertionRow insertionRow = sender as InsertionRow;
      if( insertionRow != null )
      {
        foreach( InsertionCell cell in insertionRow.Cells )
        {
          if( cell.IdleValue != null )
          {
            cell.Value = cell.IdleValue;
          }
        }
      }
    }

 

Imported from legacy forums. Posted by André (had 2264 views)