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

[Solved] Setting Tabindex for GridButtonColumn

1 Answer 190 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Khalid Dermoumi
Top achievements
Rank 1
Khalid Dermoumi asked on 15 Dec 2009, 04:50 PM
Hi,

i have a RadGrid with GridButtonColumns. The user needs to be able to navigate the buttons generated by the GridButtonColumns with the keyboard. There lies the problem: i can't set a TabIndex to the column and consequently the buttons are not included in keyboard navigation.
I can set a Tabindex to the Grid as a whole, but not to the columns. What can be done?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Dec 2009, 08:06 AM
Hello Khalid,

You can access the buttons for the ButtonColumn and set the tabindex for the buttons.Check out the following example:
aspx:
<telerik:GridButtonColumn  ButtonType="LinkButton" HeaderText="Button Column" Text="sfsdf" Text="Button" UniqueName="ButtonColumn"></telerik:GridButtonColumn> 

c#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem item = (GridDataItem)e.Item; 
            ((LinkButton)item["ButtonColumn"].Controls[0]).TabIndex = 1;             
        } 
   } 

Thanks
Princy.
Tags
Grid
Asked by
Khalid Dermoumi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or