분노의 챔질
UltraGrid속성 본문
GroupBox Caption 바꾸기
UltraGrid속성 -> DisplayLayOut -> GroupByBox -> Prompt
셀선택시 속성
UltraGrid속성 -> DisplayLayOut -> Override-> CellClickAction : RowSelect로 변경
셀 Edit Mode 변경
UltraGrid디자이너 실행 -> Band and Column Setting -> Band -> Columns -> CellActivation 속성변경
마우스오버시 색변환
UltraGrid속성 -> DisplayLayOut -> Override-> HotTrackRowAppearance : BackColor변경
한개의 Row만 선택
UltraGrid속성 -> DisplayLayOut -> Override-> MaxSelectedRows : 0
UltraGrid속성 -> DisplayLayOut -> Override-> SelectTypeRow : None
특정행에 위치하며 Select되게 하기
ultraGrid1.Rows[RowNumber].Activated = true;
마우스 클릭 및 더블클릭시 특정필드값 가져오기
ultraGrid1.ActiveRow.Cells["필드"].Value
ultraGrid1.ActiveRow.Cells["필드"].Text
// 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;
// 셀과 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;
*/
'Programming > C#' 카테고리의 다른 글
오라클 연결 C# (0) | 2010.12.10 |
---|---|
UltraCombo 사용법 (0) | 2010.12.03 |
UltraGrid 기초 사용법 (2) | 2010.12.02 |
AForge.NET (0) | 2010.12.01 |
C# Ping Test (0) | 2010.08.24 |