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
15
Unable to Navigate Pagination Buttons Through Keyboard Tab and Unable to perform Keyboard Enter action on Pagination Buttons
posted

Hi,

I am using WebDataGrid within Infragistics45.Web.v19.2 assembly.

I am unable to move next or previous page through the keyboard tab and I am Unable to Load the records when clicking on Keyboard Enter on specific pagination button.

To say in simple, Pagination Focus, Pagination Enter has to work.

For Example, see the below Image

After performing search, when we click on tab, the focus should go to the links inside the grid. once it is done, focus has to go pagination.

In Pagination, Keyboard enter has to work. 

Once the records are loaded on keyboard enter, when user clicks on tab, focus again should move to inside the links of the gird.

Below is the Code of grid and Pagination

Could You please provide the solution on this

Thanks

Adeeb Misba

 

Parents Reply
  • 1320
    Offline posted in reply to Adeeb Misba

    Hello Adeeb,

    In order to be able to tab through the paging buttons and on enter to change the current page, the paging should be templated. This is necessary because the default paging contains span elements instead of buttons. After templating the paging, by pressing “Tab” the focus would move from the “link buttons” to the paging buttons. When “Enter” is pressed the new page is loaded and the focus would be again on the “link buttons”. The pager is templated by adding a panel and then on Page_Load the buttons are created and added to this panel.

    int count = ((DataTable)wdg.DataSource).Rows.Count;

    int itemsPerPage = wdg.Behaviors.Paging.CurrentPageSize;

    int pages = count / itemsPerPage;

    Panel field = (Panel)wdg.Behaviors.Paging.PagerTemplateContainerBottom.FindControl("PagerContainer");

            for (int i = 0; i < pages; i++)  {         

                Button button = new Button();

                button.Text = (i + 1).ToString();

                button.ID = i.ToString();            

                field.Controls.Add(button);

                button.Click += new EventHandler(changePage); 

            }

    I have prepared a sample, demonstrating how this could be achieved. Please test it on your side and let me know if you need additional information regarding this matter.

    Regards,

    Monika Kirkova,

    Infragistics

    WebDataGridPagingTemplate.zip

Children
No Data