Telerik support kindly provided me with this client side code for supporting PageUp and PageDown key presses
for paging after the Grid has focus. It works for the MasterTableView level.
Perhaps one of the forum members could make a server side equivalent function in C# or VB.
for paging after the Grid has focus. It works for the MasterTableView level.
Perhaps one of the forum members could make a server side equivalent function in C# or VB.
| <%--Handle PageUp and PageDown key presses --%> |
| <script type="text/javascript"> |
| var shouldFocus = false; |
| function gridCreated(sender,args) { |
| $addHandler(sender.get_element(),"keydown",Function.createDelegate(sender,keydownHandler)); |
| if(shouldFocus){ |
| sender.get_element().focus(); |
| shouldFocus = false;} |
| } |
| function keydownHandler(args) { |
| if(args.keyCode==33 && this.get_masterTableView().get_currentPageIndex() > 0) { |
| this.get_masterTableView().page("prev"); |
| shouldFocus = true;} |
| else if(args.keyCode==34 ) { |
| this.get_masterTableView().page("next"); |
| shouldFocus = true;} |
| } |
| </script> |
| <telerik: RadGrid ID = RadGrid1 ETC.> |
| <ClientSettings AllowKeyboardNavigation="true"> |
| <Selecting AllowRowSelect="true" /> |
| <KeyboardNavigationSettings EnableKeyboardShortcuts="true" AllowActiveRowCycle="true" /> |
| <ClientEvents OnGridCreated="gridCreated" /> |
| </ClientSettings> Other Grid code </telerik:RadGrid> |