gridcontrol页尾文本定制

private void gridView1_CustomDrawFooterCell(object sender, DevExpress.XtraGrid.Views.Grid.FooterCellCustomDrawEventArgs e)
{
int dx = e.Bounds.Height;
Brush brush = e.Cache.GetGradientBrush(e.Bounds, Color.Wheat, Color.FloralWhite, LinearGradientMode.Vertical);
Rectangle r = e.Bounds;
ControlPaint.DrawBorder3D(e.Graphics, r, Border3DStyle.RaisedInner);
r.Inflate(-1, -1);
e.Graphics.FillRectangle(brush, r);
r.Inflate(-2, 0);
e.Appearance.DrawString(e.Cache, e.Info.DisplayText, r);
e.Handled = true;
}

猜你喜欢

转载自www.cnblogs.com/yzmn/p/10208022.html