// Scroll 화면분할 속성
ultraGrid1.DisplayLayout.MaxColScrollRegions = 5;
ultraGrid1.DisplayLayout.MaxRowScrollRegions = 5;
// Bounding 에서 등록되지 않은 필드에 대한 처리
ultraGrid1.DisplayLayout.NewColumnLoadStyle = Infragistics.Win.UltraWinGrid.NewColumnLoadStyle.Hide;
// ActiveCell.BackColor & ForeColor 설정
ultraGrid1.DisplayLayout.Override.ActiveCellAppearance.BackColor = System.Drawing.SystemColors.Window;
ultraGrid1.DisplayLayout.Override.ActiveCellAppearance.ForeColor = System.Drawing.SystemColors.ControlText;
// ActiveRow.BackColor & ForeColor 설정
ultraGrid1.DisplayLayout.Override.ActiveRowAppearance.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(230)), ((System.Byte)(238)), ((System.Byte)(240)));
ultraGrid1.DisplayLayout.Override.ActiveRowAppearance.ForeColor = Color.White;
// Alternate Row backcolor 설정
ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor = ROW_ALTERNATE_BACKCOLOR;
ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColorDisabled = ROW_ALTERNATE_BACKCOLOR;
// 셀과 Row의 그리드선 처리
ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dashed;
ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dashed;
// Cell click action : Row 선택 또는 셀 수정 등의 속성
ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect;
// Row 높이 조절 : Default = -1
ultraGrid1.DisplayLayout.Override.DefaultRowHeight = 50;
// Header의 속성
ultraGrid1.DisplayLayout.Override.HeaderAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.Default;//.Select;//.SortMulti;
ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand;
// 홀수 줄 바탕색
ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(242)), ((System.Byte)(247)), ((System.Byte)(251)));
// Row 문자열의 수직위치 조절
ultraGrid1.DisplayLayout.Override.RowAppearance.TextVAlign = Infragistics.Win.VAlign.Middle;
// SelectedRow.BackColor & ForeColor 설정
ultraGrid1.DisplayLayout.Override.SelectedRowAppearance.BackColor = System.Drawing.SystemColors.Window;
ultraGrid1.DisplayLayout.Override.SelectedRowAppearance.ForeColor = System.Drawing.SystemColors.ControlText;
// Column0 에 RowIndex 추가
//ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
//ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
//ultraGrid1.DisplayLayout.Override.RowSelectorAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
// SelectedRow.BackColor 설정
ultraGrid1.DisplayLayout.Override.SelectedRowAppearance.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(242)), ((System.Byte)(247)), ((System.Byte)(251)));
ultraGrid1.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single;
// Scroll이 최하단으로 내려갔을때 빈공간이 없도록 설정
ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
appearance1.ForeColor = System.Drawing.Color.Purple;
ultraGrid1.DisplayLayout.Override.CellAppearance = appearance1;
// Row Header 삭제
this.ultraGrid2.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
//외에 많은 속성 편집들이 있는데...
//아래 코드는 각 컬럼별로 코드에서 (편집모드로)속성을 설정한 부분입니다.
//sender = UltraGrid;
ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
//Infragistics.Win.UltraWinGrid.BandsCollection ugdBands;
//ugdBands = ultraGrid1.DisplayLayout.Bands;
//ugdBands[0].Columns["a"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
//ugdBands[0].Columns["a"].Width = 40;
//ugdBands[0].Columns["a"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
//ugdBands[0].Columns["b"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
//ugdBands[0].Columns["b"].Width = 80;
//ugdBands[0].Columns["b"].Hidden = true;
//ugdBands[0].Columns["c"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
//ugdBands[0].Columns["c"].Width = 170;
//ugdBands[0].Columns["c"].MaxLength = 20;
//ugdBands[0].Columns["c"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
//ugdBands[0].Columns["d"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
//ugdBands[0].Columns["d"].Width = 80;
//ugdBands[0].Columns["d"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
//ugdBands[0].Columns["d"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
//Infragistics.Win.ValueList oValueList2 = new Infragistics.Win.ValueList();
//oValueList2.ValueListItems.Add("Y", "Yes");
//oValueList2.ValueListItems.Add("N", "No");
//ugdBands[0].Columns["d"].ValueList = oValueList2;
//ultraGrid1.DisplayLayout.Override.ActiveCellAppearance.Reset();
//ultraGrid1.DisplayLayout.Override.ActiveRowAppearance.Reset();
/*
Infragistics.Win.UltraWinGrid.UltraDropDown uDrop = new UltraDropDown();
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].EditorControl = uDrop;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;
*/ this.grdList.DisplayLayout.Override.SelectedRowAppearance.BackColor = UGrid.DefaultBackColor; this.grdList.DisplayLayout.Override.SelectedRowAppearance.ForeColor = System.Drawing.SystemColors.HighlightText; this.grdList.DisplayLayout.Override.ActiveRowAppearance.BackColor = Color.Empty;
'Study > Programming' 카테고리의 다른 글
C# panel 마우스클릭 이동 (0) | 2011.01.12 |
---|---|
C# Infragistics.UltraWinGrid의 Dropdown List 추가 (0) | 2010.11.10 |
C# 비주얼스튜디오 스마트클라이언트 (0) | 2010.07.27 |
소스세이프2005 서버 설정 방법 (0) | 2010.07.01 |
C# 모든 TextBox 초기화 (0) | 2010.04.28 |