첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
using System.Windows.Forms;

using DevExpress.XtraPivotGrid;

PivotGridControl pivotGridControl = new PivotGridControl();

pivotGridControl.Name = "pivotGridControl";
pivotGridControl.Dock = DockStyle.Fill;

Controls.Add(pivotGridControl);

PivotGridField largeCategoryField = new PivotGridField();

largeCategoryField.Name      = "largeCategoryField";
largeCategoryField.Caption   = "대분류";
largeCategoryField.FieldName = "LargeCategory";
largeCategoryField.Area      = PivotArea.ColumnArea;
largeCategoryField.AreaIndex = 0;

pivotGridControl.Fields.Add(largeCategoryField);

PivotGridField middleCategoryField = new PivotGridField();

middleCategoryField.Name      = "middleCategoryField";
middleCategoryField.Caption   = "중분류";
middleCategoryField.FieldName = "MiddleCategory";
middleCategoryField.Area      = PivotArea.ColumnArea;
middleCategoryField.AreaIndex = 1;

pivotGridControl.Fields.Add(middleCategoryField);

PivotGridField dateField = new PivotGridField();

dateField.Name      = "dateField";
dateField.Caption   = "일자";
dateField.FieldName = "Date";
dateField.Area      = PivotArea.RowArea;
dateField.AreaIndex = 0;

pivotGridControl.Fields.Add(dateField);

PivotGridField amountField = new PivotGridField();

amountField.Name      = "amountField";
amountField.Caption   = "금액";
amountField.FieldName = "Amount";
amountField.Area      = PivotArea.DataArea;
amountField.AreaIndex = 0;

pivotGridControl.Fields.Add(amountField);
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요