using Infragistics.Win.UltraWinGrid;
private UltraGrid ultraGrid;
...
#region UltraGrid ENTER 처리하기 - ultraGrid_Enter(sender, e)
/// <summary>
/// UltraGrid ENTER 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void ultraGrid_Enter(object sender, EventArgs e)
{
if(this.ultraGrid.ActiveRow == null)
{
this.ultraGrid.ActiveRow = this.ultraGrid.GetRow(ChildRow.First);
}
if(this.ultraGrid.ActiveCell == null)
{
this.ultraGrid.ActiveCell = this.ultraGrid.ActiveRow.Cells[2];
}
}
#endregion
#region UltraGrid 키 DOWN 처리하기 - ultraGrid_KeyDown(sender, e)
/// <summary>
/// UltraGrid 키 DOWN 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void ultraGrid_KeyDown(object sender, KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.Up :
this.ultraGrid.PerformAction(UltraGridAction.ExitEditMode, false, false);
this.ultraGrid.PerformAction(UltraGridAction.AboveCell , false, false);
e.Handled = true;
this.ultraGrid.PerformAction(UltraGridAction.EnterEditMode, false, false);
break;
case Keys.Down :
this.ultraGrid.PerformAction(UltraGridAction.ExitEditMode, false, false);
this.ultraGrid.PerformAction(UltraGridAction.BelowCell , false, false);
e.Handled = true;
this.ultraGrid.PerformAction(UltraGridAction.EnterEditMode, false, false);
break;
case Keys.Right :
this.ultraGrid.PerformAction(UltraGridAction.ExitEditMode , false, false);
this.ultraGrid.PerformAction(UltraGridAction.NextCellByTab, false, false);
e.Handled = true;
this.ultraGrid.PerformAction(UltraGridAction.EnterEditMode, false, false);
break;
case Keys.Left :
this.ultraGrid.PerformAction(UltraGridAction.ExitEditMode , false, false);
this.ultraGrid.PerformAction(UltraGridAction.PrevCellByTab, false, false);
e.Handled = true;
this.ultraGrid.PerformAction(UltraGridAction.EnterEditMode, false, false);
break;
}
}
#endregion