Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Keyboard shortcuts For Custom Pagination
posted

Hello All,

I have a custom pagination built in my application,

Requirement:
I have a scenario and requirement to use Keyboard shortcuts for moving the pages to next and Previous.

Please provide me the best approach to achieve this, I have seen this feature built in google mail box.[j and k are used to move pages].

Thanks for the help,
Chaitanya...

 

 

 

 

 

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    This is a good question. I think this is possible, though not supported by the grid out of the box. The grid exposes a flexible client side object model - please check out the grid object on the client here

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/WebGrid_Object_CSOM.html 

    Notice the javascript goToPage method documented there. So the idea is to to have input controls on the page that can gain keyboard shortcuts via access key, and call the goToPage method from there.

    e.g.

    <input type="textbox" onfocus="goToNextGridPage()"  style="position:absolute; top: -100px;left: -100px" accesskey="n" />

    and then in the goToNextGridPage() write javascript that calls goToPage with the next index page based on that.

    Other ideas are a variation of this - hook the document.onkeydown event for example and call goToPage from there based on the key pressed.

    Hope this helps.

Children
No Data