-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyGridControl.cs
52 lines (47 loc) · 1.94 KB
/
MyGridControl.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Developer Express Code Central Example:
// How to customize the GridControl's print output.
//
// This example demonstrates how to override the default exporting process to take
// into account a custom drawn content provided via the
// GridView.CustomDrawFooterCell Event
// (ms-help://DevExpress.NETv10.1/DevExpress.WindowsForms/DevExpressXtraGridViewsGridGridView_CustomDrawFooterCelltopic.htm)
//
// You can find sample updates and versions for different programming languages here:
// http://www.devexpress.com/example=E2667
using System;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Registrator;
namespace MyXtraGrid {
public class MyGridControl : GridControl {
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
protected override BaseView CreateDefaultView() {
return CreateView("MyGridView");
}
protected override void RegisterAvailableViewsCore(InfoCollection collection) {
base.RegisterAvailableViewsCore(collection);
collection.Add(new MyGridViewInfoRegistrator());
}
private void InitializeComponent()
{
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
this.SuspendLayout();
//
// gridView1
//
this.gridView1.GridControl = this;
this.gridView1.Name = "gridView1";
//
// MyGridControl
//
this.MainView = this.gridView1;
this.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false);
}
}
}