This is a migrated thread and some comments may be shown as answers.

Tabbing through Grid skips buttons

3 Answers 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jerry
Top achievements
Rank 1
jerry asked on 01 Mar 2010, 09:08 PM
I have add and delete buttons within my grid and using the tab key they get passed up and the focus is on the first column on the next line.  How can I have my buttons gain focus?  I have to make my app fully keyboard friendly.  Any other issues I might face with the grid using the keyboard?

Thank You

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 04 Mar 2010, 02:28 PM
Hi jerry,

Thank you for writing. Actually, RadGridView does not support the behavior out of the box. The command column is skipped if you press a tab while in edit mode and is not skipped if the grid is not in edit mode. That is because this type of column is specific and has not default editor. The only way to implement your requirement can be using a custom grid behavior, inheritor of BaseGridBehavior class and overriding ProcessTabKey event. Let me know if you need additional assistance on the topic. 

Kind regards,
Martin Vasilev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
jerry
Top achievements
Rank 1
answered on 04 Mar 2010, 03:53 PM
Martin,
Thank you for your reply.

Do you have any examples of this in c#?

Thank you again for your help.

Jerry
0
Martin Vasilev
Telerik team
answered on 09 Mar 2010, 03:39 PM
Hello jerry,

Thank you for getting back to me. Since the described scenario is a custom one, we do not have an available example or code snippet. However, changing the behavior with a custom one is a relatively simple task. Please, consider the following code as a simple example on how to do that:

     this.radGridView1.GridBehavior = new CustomGridBehavior();
  
    public class CustomGridBehavior : BaseGridBehavior
    {
        protected override bool ProcessTabKey(KeyEventArgs keys)
        {
            //implement your custom logic here...
            return base.ProcessTabKey(keys);
        }
    }

Do not hesitate to contact me again if you need additional assistance. 

Kind regards,
Martin Vasilev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
jerry
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
jerry
Top achievements
Rank 1
Share this question
or