Home Forums WinForms controls Xceed Grid for WinForms SummaryRow effect only on "Enter" Reply To: SummaryRow effect only on "Enter"

User (Old forums)
Member
Post count: 23064

This is because “Enter” makes the row leave edition, whereas “Tab” and click on another cell of the same row does not, that is, the row is still in edition.  And for the SummaryRow to update, the row must leave edition.  What you can do is simply handle the EditLeft or the ValueChanged event on the cell, and call EndEdit() on the row.

e.g.:

    private void Form1_Load( object sender, EventArgs e )
    {
      foreach( DataCell cell in dataRowTemplate1.Cells )
      {
        cell.EditLeft += new EditLeftEventHandler( cell_EditLeft );
      }
    }

    void cell_EditLeft( object sender, EditLeftEventArgs e )
    {
      Cell cell = sender as Cell;
      if( cell != null )
        cell.ParentRow.EndEdit();
    }

 

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