본문 바로가기

Study/Programming

C# UltraGrid 방향키 KeyMapping

반응형
private void KeyMapping()
        {
            #region Enter, Down, Up, Left, Right,Tab Key Mapping
            // Grid Enter Key Event Setting
            Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping1 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Enter, Infragistics.Win.UltraWinGrid.UltraGridAction.BelowCell, 0, 0, 0, 0);
            Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping2 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Enter, Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, 0, 0, 0, 0);
            Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping3 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Down, Infragistics.Win.UltraWinGrid.UltraGridAction.BelowCell, 0, 0, 0, 0);
            Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping4 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Down, Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping5 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Up, Infragistics.Win.UltraWinGrid.UltraGridAction.AboveCell, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping6 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Up, Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping7 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Tab, Infragistics.Win.UltraWinGrid.UltraGridAction.NextCellByTab, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping8 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Tab, Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping9 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Left, Infragistics.Win.UltraWinGrid.UltraGridAction.PrevCell, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping10 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Left, Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping11 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Right, Infragistics.Win.UltraWinGrid.UltraGridAction.NextCell, 0, 0, 0, 0);
Infragistics.Win.UltraWinGrid.GridKeyActionMapping keyMapping12 = new Infragistics.Win.UltraWinGrid.GridKeyActionMapping(Keys.Right, Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, 0, 0, 0, 0);

            ugrd.KeyActionMappings.Add(keyMapping1);
            ugrd.KeyActionMappings.Add(keyMapping2);
            ugrd.KeyActionMappings.Add(keyMapping3);
            ugrd.KeyActionMappings.Add(keyMapping4);
            ugrd.KeyActionMappings.Add(keyMapping5);
            ugrd.KeyActionMappings.Add(keyMapping6);
            ugrd.KeyActionMappings.Add(keyMapping7);
            ugrd.KeyActionMappings.Add(keyMapping8);
            ugrd.KeyActionMappings.Add(keyMapping9);
            ugrd.KeyActionMappings.Add(keyMapping10);
            ugrd.KeyActionMappings.Add(keyMapping11);
            ugrd.KeyActionMappings.Add(keyMapping12);

            #endregion
        }
반응형