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

using System;

using Infragistics.Win.UltraWinGrid;

private UltraGrid ultraGrid;

...

#region UltraGrid 행 초기화 하기 - ultraGrid_InitializeRow(sender, e)

/// <summary>
/// UltraGrid 행 초기화 하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void ultraGrid_InitializeRow(object sender, InitializeRowEventArgs e)
{
    if(e.Row.Band.Index == 0)
    {
        e.Row.ExpandAll();
    }
}

#endregion

#region Split Row Scroll Region 버튼 클릭시 처리하기 - splitRowScrollRegionButton_Click(sender, e)

/// <summary>
/// Split Row Scroll Region 버튼 클릭시 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void splitRowScrollRegionButton_Click(object sender, EventArgs e)
{
    this.ultraGrid.DisplayLayout.MaxRowScrollRegions = 10;

    this.ultraGrid.DisplayLayout.RowScrollRegions[0].Split();
    this.ultraGrid.DisplayLayout.RowScrollRegions[1].Split();
    this.ultraGrid.DisplayLayout.RowScrollRegions[2].Split();
}

#endregion

#region One Row Scroll Region 버튼 클릭시 처리하기 - oneRowScrollRegionButton_Click(sender, e)

/// <summary>
/// One Row Scroll Region 버튼 클릭시 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void oneRowScrollRegionButton_Click(object sender, EventArgs e)
{
    if(this.ultraGrid.DisplayLayout.RowScrollRegions.Count > 1)
    {
        for(int i = this.ultraGrid.DisplayLayout.RowScrollRegions.Count - 1; i >= 1; i--)
        {
            this.ultraGrid.DisplayLayout.RowScrollRegions.Remove(this.ultraGrid.DisplayLayout.RowScrollRegions[i]);
        }
    }

    this.ultraGrid.DisplayLayout.MaxRowScrollRegions = 1;
}

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

댓글을 달아 주세요