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

▶ XAML

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

 

728x90

 

▶ C#

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

...

#region GROUP SUMMARY 생성하기 - CreateGroupSummary()

/// <summary>
/// GROUP SUMMARY 생성하기
/// </summary>
private void CreateGroupSummary()
{
    this.gridControl.GroupSummary.Add
    (
        new GridSummaryItem()
        {
            FieldName = "Age",
            SummaryType = SummaryItemType.Min
        }
    );

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

#endregion

...

this.gridControl.ItemsSource = new AccountList().GetData();

this.gridControl.GroupBy(this.gridControl.Columns["Married"], ColumnSortOrder.Ascending);

CreateGroupSummary();

 

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

댓글을 달아 주세요