[英]How to make devexpress gridcontrol's indicator display text bold
[英]How to set custom text to a GroupRow in the CustomDrawGroupRow event of a DevExpress GridControl?
我正在寻找一种在CustomDrawGroupRow
事件中设置GroupRow
文本而不设置e.Handled = true
的方法,因为我还需要应用基本绘图:
this.gridView.CustomDrawGroupRow += (s, e) =>
{
/* set the GroupRow text here without using e.Handled = true */
}
我试过使用e.Graphics.DrawString
但我不能使用e.Appearance.BackColor
因为我需要设置e.Handled = true
来绘制禁用它的string
您需要将e.Info
为GridGroupRowInfo
并将GridGroupRowInfo.GroupText
设置为您的值:
using DevExprss.XtraGrid.Views.Grid.ViewInfo;
...
this.gridView.CustomDrawGroupRow += (s, e) =>
{
GridGroupRowInfo groupInfo = e.Info as GridGroupRowInfo;
groupInfo.GroupText = "Custom group text";
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.