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

Move focus out of RadGrid using Keyboard

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Veenu
Top achievements
Rank 1
Veenu asked on 07 Mar 2010, 03:08 PM
Hi,

If we enable Multiple Row selection the RadGrid, then while using Keyboard, every checkbox gets a focus during traversing using keyboard. So, if I want to select 4 records out of 100, I need to press keyboard key 100 times to get focus out of RadGrid.

Is there any way to exit out of the radGrid using Keyboard once I've done my selection?

Thanks in advance.

Best regards,
Veenu Munjal

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Mar 2010, 07:14 AM

Hello Veenu,

You can attach OnKeyPress client event and check for the key pressed when grid in focus, then set the next control in focus in the event handler.

JavaScript:

 
    function OnKeyPress(sender, args) {  
        if (args.get_keyCode() == 102) {  // Key code of f key is 102, press f to focus to next control  
            setTimeout("document.getElementById('TextBox1').focus();", 200); // focus to next control, here textbox  
        }  
    } 

[You can customize the logic as per your requirement]

Regards,

Shinu.

Tags
Grid
Asked by
Veenu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or