Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Sum-Column within GroupCell
posted

My grid contains a GroupColumn containing 3 editable value-columns and 1 readonly unbound summary-column which value is calculated by a ValueConverter:

The Sum column won't be recalculated if one of the 3 values change, thus I tried to use the ActiveCellChanged event to access the Sum-cell and call a Refresh() from there.

Since I wasn't able to access the Sum-cell I was wondering, if there is an easy way to recalculate the Sum-column?

Parents
  • 21382
    posted

    You can access the unbound cell via the row's cellscollection and call the .Refresh off that

     

     

            private void grid_CellExitedEditMode
    (object sender, Infragistics.Controls.Grids.CellExitedEditingEventArgs e)
            {
                ((UnboundCell)e.Cell.Row.Cells[ (UnboundColumn)grid.Columns.AllColumns["xxx"] ]).Refresh();
            }
    
    
    
    You would not be able to access the cell via the key value.  You could use the actual column object and
    find it using that.
    
    
    - Edit -
    
    
    Just typing it out a different way so that I know its visible
    UnboundColumn uc = (UnboundColumn)grid.Columns.AllColumns["XXX"];
    UnboundCell cell = (UnboundCell)e.Cell.Row.Cells[uc];
    cell.Refresh()
    
    
    
    

     

Reply Children