Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
Active cell to Edit when mooving with up/down/left/right keys
posted

Hi,

In a wingrid everytime I click on up/down/left or right key, the next cell must be activate to edit, I searched a lot in the forum, I tried many example but nothing is working, this what I was implemanting :

public void grd_KeyDown(object sender, KeyEventArgs e)
        {

         switch (e.KeyData)
            {
                case Keys.Down:
                    grd.PerformAction(UltraGridAction.BelowRow, false, false);
                    grd.PerformAction(UltraGridAction.EnterEditMode, false, false);                                   
                    break;
                case Keys.Up:
                    grd.PerformAction(UltraGridAction.AboveRow, false, false);
                    grd.PerformAction(UltraGridAction.EnterEditMode);                    
                    break;
                case Keys.Right:
                    grd.ActiveColScrollRegion.Position += 175;                    
                    break;
                case Keys.Left:
                    grd.ActiveColScrollRegion.Position -= 175;                    
                    break;
            }

            grd.DisplayLayout.Override.CellClickAction = CellClickAction.CellSelect;
            e.Handled = true;

}

can anyone give me a help, thank you