/
MyGridView.cs
34 lines (31 loc) · 1.29 KB
/
MyGridView.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using DevExpress.XtraGrid.Views.Base;
using System.Drawing;
using DevExpress.Utils;
using DevExpress.XtraGrid.Columns;
using DevExpress.Utils.Drawing;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Drawing;
namespace MyXtraGrid {
[System.ComponentModel.DesignerCategory("")]
public class MyGridView : GridView {
public MyGridView() : this(null) {}
public MyGridView(DevExpress.XtraGrid.GridControl grid) : base(grid) {
// put your initialization code here
}
protected override string ViewName { get { return "MyGridView"; } }
protected override DevExpress.XtraGrid.Views.Printing.BaseViewPrintInfo CreatePrintInfoInstance(DevExpress.XtraGrid.Views.Printing.PrintInfoArgs args)
{
return new MyGridViewPrintInfo(args);
}
public FooterCellCustomDrawEventArgs GetCustomDrawCellArgs(GraphicsCache cache, Rectangle rect, GridColumn col)
{
GridFooterCellInfoArgs styleArgs = new GridFooterCellInfoArgs(cache);
styleArgs.Bounds = new Rectangle(new Point(0, 0), rect.Size);
FooterCellCustomDrawEventArgs args = new FooterCellCustomDrawEventArgs(cache, -1, col, null, styleArgs);
args.Handled = true;
RaiseCustomDrawFooterCell(args);
return args;
}
}
}