We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Immediate total in a summary row

Hello, We are running ES 2.0.5.1. We have a total calculated in a summary row as user moves away from a given row, but we are looking at having new logic calculating it as user types into a row. Could anyone advise what is the best way to calculate a total in a custom summary row automatically as user enters a value into one of rows? Thanks.

4 Replies

AD Administrator Syncfusion Team August 19, 2005 08:54 AM UTC

You can try handling TableControlCurrentCellMoved and call Table.EndEdit there.
private void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
{
	e.TableControl.Table.EndEdit();
}

            


IK Igor Kashtelyan August 22, 2005 01:16 PM UTC

Thanks Clay, My understanding is that CurrentCellMoved would trigger summary update when sursor would move to another cell, but this is not exactly what I need. Let''s say a user types into a column digit "5", so a summary will immediatelly update the total and add 5 to the existing amount. In other words, if the total was 10 before, we user just typed 5 into a column the total in the summary row will automatically display 15. Mind you, not when a user moves to another cell/column/whatnot So, which event handler would be the place to handle logic as described. Thanks. >You can try handling TableControlCurrentCellMoved and call Table.EndEdit there. >
>private void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
>{
>	e.TableControl.Table.EndEdit();
>}
>
            


AD Administrator Syncfusion Team August 22, 2005 03:31 PM UTC

You can probably catch such changes in TableControlCurrentCellChanged. But if your user is planning on typing 123, forcing the grid to save the changes after 1, and after 12, and after 123 normally takes the cell out of edit mode with each keystroke, and this would be a problem. If you need such a dynamic update, you may have to do additional work to avoid this problem.


IK Igor Kashtelyan August 22, 2005 03:34 PM UTC

Thanks, I appreciate your timely response. >You can probably catch such changes in TableControlCurrentCellChanged. But if your user is planning on typing 123, forcing the grid to save the changes after 1, and after 12, and after 123 normally takes the cell out of edit mode with each keystroke, and this would be a problem. If you need such a dynamic update, you may have to do additional work to avoid this problem.

Loader.
Live Chat Icon For mobile
Up arrow icon