Skip to main content

Display sum of values of a column in Group Header row

Comments

1 comment

  • Dapfor Team

    Hi,

    This event is called each time when the grid repaints a group row. For example you can hide a part of the grid with other window and then put that window on the taskbar: if some part of a group row was hidden, then you’ll get OnPaintGroupRow notification.

    It is possible to ask the grid to repaint a particular row or cell. You can do it just calling Row.Invalidate()/Cell.Invalidate(). The grid does it implicitly when a row is added or removed to/from a group.

    What is about your application, when a value is updated, you can take a row’s parent and call the invalidate method. If you use INotifyPrpertyChanged Interface, the best way is to subscribe for Grid.RowUpdated event and invalidate there the group:

    grid.RowUpdated += delegate(object sender, GridRowUpdateEventArgs e) 
    {
    Row parent = e.Row.Parent;
    if(parent != null && parent.IsGroup)
    {
    parent.Invalidate();
    }
    };

     

    Best regards,
    Dapfor

    0

Please sign in to leave a comment.

Powered by Zendesk