첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
다운로드

▶ MainForm.cs

using DevExpress.Data;
using DevExpress.XtraEditors;
using DevExpress.XtraPivotGrid;

namespace TestProject
{
    /// <summary>
    /// 메인 폼
    /// </summary>
    public partial class MainForm : XtraForm
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - MainForm()

        /// <summary>
        /// 생성자
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            this.tableAdapter.Fill(this.nwindDataSet.SalesPerson);

            this.pivotGridControl.OptionsData.DataFieldUnboundExpressionMode = DataFieldUnboundExpressionMode.UseSummaryValues;

            PivotGridField statusField = this.pivotGridControl.Fields.Add("Status", PivotArea.DataArea);

            statusField.UnboundType       = UnboundColumnType.Integer;
            statusField.UnboundExpression = string.Format
            (
                "(Iif([{0}] < 100000, -1, Iif([{0}] < 150000, 0, 1)))",
                extendedPriceField.ExpressionFieldName
            );
            statusField.AllowedAreas      = PivotGridAllowedAreas.DataArea;
            statusField.KPIGraphic        = PivotKPIGraphic.Faces;
        }

        #endregion
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요