■ UltraGrid 클래스의 그리드에서 WinProgressBar를 사용하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
using System.Data; using Infragistics.Win.UltraWinGrid; using Infragistics.Win.UltraWinProgressBar; private UltraGrid ultraGrid; private UltraProgressBar ultraProgressBar; ... this.ultraGrid.InitializeLayout += ultraGrid_InitializeLayout; this.ultraGrid.DataSource = GetDataTable(); ... #region UltraGrid 레이아웃 초기화 하기 - ultraGrid_InitializeLayout(sender, e) /// <summary> /// UltraGrid 레이아웃 초기화 하기 /// </summary> /// <param name="sender">이벤트 발생자</param> /// <param name="e">이벤트 인자</param> void ultraGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e) { this.ultraProgressBar.Minimum = 0; this.ultraProgressBar.Maximum = 100; e.Layout.Bands[0].Columns["Score"].EditorComponent = this.ultraProgressBar; } #endregion #region 데이터 테이블 구하기 - GetDataTable() /// <summary> /// 데이터 테이블 구하기 /// </summary> /// <returns>데이터 테이블</returns> private DataTable GetDataTable() { DataTable table = new DataTable(); table.Columns.Add("Score", typeof(double)); table.Rows.Add(10d ); table.Rows.Add(50d ); table.Rows.Add(30d ); table.Rows.Add(100d); table.Rows.Add(70d ); table.Rows.Add(20d ); return table; } #endregion |