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

Rad Grid Change page with cursor

2 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sam
Top achievements
Rank 1
sam asked on 19 Jul 2010, 11:44 PM
Anyone knows how can i change or navigate in Rad Grid change page (move to next page) using the keyboard cursor left or right
it must be on key press

Please help

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 Jul 2010, 06:07 AM
Hello Sam,

Try the following code snippet in OnKeyPress ClientEvent of RadGrid.

ASPX:
<ClientSettings>
    <ClientEvents  OnKeyPress="OnKeyPress" />
</ClientSettings>

Java Script:
<script type="text/javascript">
   function OnKeyPress(sender, args)
     {
        var masterTable = sender.get_masterTableView();
        if (args._domEvent.keyCode == 39)
        {
            masterTable.fireCommand("Page", "Next");
        }
        if (args._domEvent.keyCode == 37)
        {
            masterTable.fireCommand("Page", "Prev");
        }
     }
</script>

Thanks,
Princy.
0
sam
Top achievements
Rank 1
answered on 20 Jul 2010, 07:37 AM
Thanks man it works fine but only  when i click on the Radgrid the key events works fine
can you please tell me how to manage this ( i think i should set on grid focus )
Tags
Grid
Asked by
sam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
sam
Top achievements
Rank 1
Share this question
or