Search code examples
c#winformsdevexpressdevexpress-gridcontrol

Remove icon from SummaryItem


i am using an GridControl with a GridView(v20.2.5). I created an SummaryItem in code with the following properties.

new GridColumnSummaryItem(SummaryItemType.Count, SummaryMode.Selection, fieldName, Strings.RowsSelected, GridSummaryColumnTags.RowsSelected)

Is it possible to remove the blue sum icon? enter image description here


Solution

  • I managed to get it working by setting the Icon to null in the CustomDrawFooterCell event.

    private void GridView_CustomDrawFooterCell(object sender, FooterCellCustomDrawEventArgs e)
    {
        if (e.Info != null && e.Info.Icon != null && e.Info.SummaryItem != null && e.Info.SummaryItem.Tag != null
            && e.Info.SummaryItem.Tag.ToString() == GridSummaryColumnTags.RowsSelected)
        {
            e.Info.Icon = null;
        }
    }