VirtualGrid skip non editable columns on Tab key

1 Answer 26 Views
VirtualGrid
Emanuele
Top achievements
Rank 1
Iron
Emanuele asked on 18 Jul 2024, 03:38 PM

Hi,

is there a way to skip non-editable columns when I use "Tab" key to navigate the cells in WinfForms VirtualGrid?

I saw that for Kendo UI there is a solution (https://docs.telerik.com/kendo-ui/knowledge-base/grid-tabkey-navigation-exclude-noneditable-columns) but I cannot find anything for WinForms VirtualGrid.

Thank you very much.

Emanuele

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 19 Jul 2024, 01:11 PM

Hello, Emanuele,

RadVirtualGrid manages user mouse and keyboard input over its rows by VirtualGridInputBehavior. By implementing a specific custom input behavior, developers can change the default row functionality or supplement the existing one. You should create a custom class which inherits from VirtualGridInputBehavior class and in your case override its HandleTabKey method and implement your custom logic there:

 public class CustomVirtualGridInputBehavior : VirtualGridInputBehavior
 {
     public CustomVirtualGridInputBehavior(RadVirtualGridElement gridElement) : base(gridElement)
     {
     }
     protected override bool HandleTabKey(KeyEventArgs keys)
     {
         //TO DO
         return base.HandleTabKey(keys);
     }
 }

Then, you should register your new custom behavior in RadVirtualGrid. More information and example are demonstrated here: InputBehavior - RadVirtualGrid - Telerik UI for WinForms

I hope this information is useful. Should you have any other questions do not hesitate to ask.

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
VirtualGrid
Asked by
Emanuele
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or