英文:
Remove icon from SummaryItem
问题
在使用 GridControl 与 GridView(v20.2.5) 时,我在代码中创建了一个 SummaryItem,具有以下属性。
new GridColumnSummaryItem(SummaryItemType.Count, SummaryMode.Selection, fieldName, Strings.RowsSelected, GridSummaryColumnTags.RowsSelected)
英文:
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)
答案1
得分: 1
我成功通过在CustomDrawFooterCell
事件中将Icon
设置为null来使其工作。
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;
}
}
英文:
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;
}
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论