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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16999 |

    summary row effect only on “Enter”, not on “tab” or click with mouse into another cell..

    what u can propose, tnx

    Imported from legacy forums. Posted by Yu (had 1291 views)

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.