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

▶ XAML

<dxg:GridControl x:Name="gridControl"
    AutoGenerateColumns="AddNew">
    <dxg:GridControl.View>
        <dxg:TableView ShowTotalSummary="True" />
    </dxg:GridControl.View>
</dxg:GridControl>

 

728x90

 

▶ C#

using DevExpress.Data;
using DevExpress.Xpf.Grid;

#region TOTAL SUMMARY 생성하기 - CreateTotalSummary()

/// <summary>
/// TOTAL SUMMARY 생성하기
/// </summary>
private void CreateTotalSummary()
{
    this.gridControl.TotalSummary.Add
    (
        new GridSummaryItem()
        {
            FieldName     = "UserName",
            SummaryType   = SummaryItemType.Count,
            DisplayFormat = "Total Users : {0}"
        }
    );

    this.gridControl.TotalSummary.Add
    (
        new GridSummaryItem()
        {
            FieldName   = "Age",
            SummaryType = SummaryItemType.Min
        }
    );

    this.gridControl.TotalSummary.Add
    (
        new GridSummaryItem()
        {
            FieldName   = "Age",
            SummaryType = SummaryItemType.Max
        }
    );
}

#endregion

 

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

댓글을 달아 주세요