■ UltraGrid 클래스에서 셀 디스플레이 포맷 지역화를 처리하는 방법을 보여준다.
▶ 예제 코드 (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 |
using System.Globalization; using Infragistics.Win.UltraWinGrid; #region UltraGrid 레이아웃 초기화 하기 - ultraGrid_InitializeLayout(sender, e) /// <summary> /// UltraGrid 레이아웃 초기화 하기 /// </summary> /// <param name="sender">이벤트 발생자</param> /// <param name="e">이벤트 인자</param> private void ultraGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e) { e.Layout.AutoFitStyle = AutoFitStyle.ExtendLastColumn; CultureInfo enUsCultureInfo = CultureInfo.CreateSpecificCulture("en-us"); CultureInfo deDeCultureInfo = CultureInfo.CreateSpecificCulture("de-de"); CultureInfo jaJpCultureInfo = CultureInfo.CreateSpecificCulture("ja-jp"); e.Layout.Bands[0].Columns["OrderDate" ].Format = "d"; e.Layout.Bands[0].Columns["OrderDate" ].FormatInfo = enUsCultureInfo; e.Layout.Bands[0].Columns["RequiredDate"].Format = "d"; e.Layout.Bands[0].Columns["RequiredDate"].FormatInfo = deDeCultureInfo; e.Layout.Bands[0].Columns["ShippedDate" ].Format = "d"; e.Layout.Bands[0].Columns["ShippedDate" ].FormatInfo = jaJpCultureInfo; } #endregion |