License Developer
Top achievements
Rank 1
License Developer
asked on 23 Dec 2009, 12:43 PM
Hi,
Iam having a rad grid, when i press tab on rad grid, the first header gets focussed and then it goes till last header, after that it goes to paging links(1,2,3,4) and then to inner content of grid. where as i need the following sequence
1.Headers
2. Inner content
3. pagination links
So as per screenshot it should go from from start date->Inner checkbox->Pagination Links
Kindly suggest me what needs to be done in this regard.
Iam having a rad grid, when i press tab on rad grid, the first header gets focussed and then it goes till last header, after that it goes to paging links(1,2,3,4) and then to inner content of grid. where as i need the following sequence
1.Headers
2. Inner content
3. pagination links
So as per screenshot it should go from from start date->Inner checkbox->Pagination Links
Kindly suggest me what needs to be done in this regard.
4 Answers, 1 is accepted
0
Hello,
Using the ItemCreated event of RadGrid, please set an appropriate tabindex attribute to all involved RadGrid elements, for example:
1. tabindex of 1 to all header LinkButtons
2. tabindex of 2 to all checkboxes
3. tabindex of 3 to all hyperlinks in the pager
http://www.telerik.com/help/aspnet-ajax/grdaccessingcellsandrows.html
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Using the ItemCreated event of RadGrid, please set an appropriate tabindex attribute to all involved RadGrid elements, for example:
1. tabindex of 1 to all header LinkButtons
2. tabindex of 2 to all checkboxes
3. tabindex of 3 to all hyperlinks in the pager
http://www.telerik.com/help/aspnet-ajax/grdaccessingcellsandrows.html
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ashish
Top achievements
Rank 1
answered on 16 Aug 2012, 10:45 AM
I think this will help you to maintain tab index in radgrid
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
Int32 i=5;
if (e.Item is GridDataItem)
{
TextBox TxtName = (TextBox)e.Item.FindControl("TxtName");
RadTimePicker RadFirstHalf_S_T = (RadTimePicker)e.Item.FindControl("RadFirstHalf_S_T");
RadTimePicker RadFirstHalf_E_T = (RadTimePicker)e.Item.FindControl("RadFirstHalf_E_T");
RadTimePicker RadSecondHalf_S_T = (RadTimePicker)e.Item.FindControl("RadSecondHalf_S_T");
RadTimePicker RadSecondHalf_E_T = (RadTimePicker)e.Item.FindControl("RadSecondHalf_E_T");
TxtName.TabIndex =Convert.ToInt16( i+1);
RadFirstHalf_S_T.TabIndex =Convert.ToInt16( i + 1);
RadFirstHalf_E_T.TabIndex =Convert.ToInt16( i + 1);
RadSecondHalf_S_T.TabIndex =Convert.ToInt16( i + 1);
RadSecondHalf_E_T.TabIndex =Convert.ToInt16( i + 1);
}
}
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
Int32 i=5;
if (e.Item is GridDataItem)
{
TextBox TxtName = (TextBox)e.Item.FindControl("TxtName");
RadTimePicker RadFirstHalf_S_T = (RadTimePicker)e.Item.FindControl("RadFirstHalf_S_T");
RadTimePicker RadFirstHalf_E_T = (RadTimePicker)e.Item.FindControl("RadFirstHalf_E_T");
RadTimePicker RadSecondHalf_S_T = (RadTimePicker)e.Item.FindControl("RadSecondHalf_S_T");
RadTimePicker RadSecondHalf_E_T = (RadTimePicker)e.Item.FindControl("RadSecondHalf_E_T");
TxtName.TabIndex =Convert.ToInt16( i+1);
RadFirstHalf_S_T.TabIndex =Convert.ToInt16( i + 1);
RadFirstHalf_E_T.TabIndex =Convert.ToInt16( i + 1);
RadSecondHalf_S_T.TabIndex =Convert.ToInt16( i + 1);
RadSecondHalf_E_T.TabIndex =Convert.ToInt16( i + 1);
}
}
0
Kerry
Top achievements
Rank 1
answered on 22 Oct 2013, 09:35 PM
We are having a similar issue. In order to be WCAG-compliant, we need our tab flow to be from the top down, and we will tab from the last header column down to the bottom pager instead of inside the grid rows where we should be. The difference here for us is that we use web parts and therefore cannot dictate tab order using tab indexing. In fact, we have to remove all tab order within the grid so that one web part doesn't get into conflict with another.
We depend on the natural tab order based on HTML, and expect the TBODY section of the grid before the TFOOTER. Has anyone found a way around this issue that does not include using tab indexing or otherwise overriding the rendering process?
We depend on the natural tab order based on HTML, and expect the TBODY section of the grid before the TFOOTER. Has anyone found a way around this issue that does not include using tab indexing or otherwise overriding the rendering process?
0
Hello Kerry,
As you may know only few html elements support the tabindex property. These are: <a>, <area>, <button>, <input>, <objec>, <select>, and <textarea>. Thus, grid headers cannot be tabbed unless they are not rendered as nested <a> elements in <th> (when we have sorting for example). Moreover, RadGrid does not define internally some custom tabbing order. It follows the natural elements sequence. If you need to implement a custom solution where the tabbing order is different, you can follow the suggestions already discussed in this thread.
Regards,
Venelin
Telerik
As you may know only few html elements support the tabindex property. These are: <a>, <area>, <button>, <input>, <objec>, <select>, and <textarea>. Thus, grid headers cannot be tabbed unless they are not rendered as nested <a> elements in <th> (when we have sorting for example). Moreover, RadGrid does not define internally some custom tabbing order. It follows the natural elements sequence. If you need to implement a custom solution where the tabbing order is different, you can follow the suggestions already discussed in this thread.
Regards,
Venelin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.