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
1360
Performance of showing/hiding summary values with lots of columns is slow
posted

Hello,

We have a grid with about 250 columns which displays multiple summary values per column and it takes between 5 and 10 seconds to simply display or hide those summary values. Is this normal simply to show/hide values?

Essentially I build the summaries up front, then when a user clicks on a button I do the following. Is this the best way to show/hide lots of summaries at once?

private bool showing = false;
private void button1_Click(object sender, RoutedEventArgs e)
{
    showing = !showing;
    foreach (var item in xamDataGrid1.FieldLayouts[0].SummaryDefinitions)
    {
        item.DisplayArea = ShowSummaryRow(showing);
    }
}

private static SummaryDisplayAreas ShowSummaryRow(bool show)
{
    return show ? (SummaryDisplayAreas.InGroupByRecords | SummaryDisplayAreas.BottomFixed | SummaryDisplayAreas.TopLevelOnly) : SummaryDisplayAreas.None;
}

Thanks,
Doug Rees

Ralph Lauren.