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

Changing the RadGrid Default TabIndices

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
blablabla
Top achievements
Rank 1
blablabla asked on 17 Jan 2012, 10:54 AM
Hi,

I have RadGrids in my project that use the InPlace edit mode, as well as a CommandItemTemplate that contains "Add New Record" and "Delete Selected Records" buttons displayed at the bottom.

The tabulation in the form goes:
1. Grid
2. Add New Record
3. Delete Selected Records
4. Row 1 Cell 1
5. Row 1 Cell 2
6. etc...

When I'm on the last cell of the last row, and I press tab, the focus goes outside of the grid.

Is it possible to change the tabulation so that it goes:

1. Grid
2. Row 1 Cell 1
3. Row 1 Cell 2
etc...
x. Last Row Last Cell
y. Add New Record
z. Delete Selected Records

Thank you.

PS: I tried the following, among a few other things, but there was no change:

protected void MyRadGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e != null)
            {
                if (e.Item.IsInEditMode)
                {
                    if (e.Item is GridHeaderItem)
                    {
                        e.Item.TabIndex = 1;
                    }
                    else if (e.Item is GridDataItem)
                    {
                        e.Item.TabIndex = 2;
                    }
                    else if (e.Item is GridFooterItem)
                    {
                        e.Item.TabIndex = 3;
                    }
                    else if (e.Item is GridCommandItem)
                    {
                        e.Item.TabIndex = 4;
                        GridCommandItem item = e.Item as GridCommandItem;
                        Button addNewRecord = (Button)item.FindControl("btnAddNewRecord");
                        Button deleteSelected = (Button)item.FindControl("btnDeletedSelected");
 
                        addNewRecord.TabIndex = 5;
                        deleteSelected.TabIndex = 6;
                    }
                }
            }

1 Answer, 1 is accepted

Sort by
0
blablabla
Top achievements
Rank 1
answered on 19 Jan 2012, 03:37 PM
I tried playing a bit more w/ the tab indexes of the actual rows and all, but no change. :(
Tags
Grid
Asked by
blablabla
Top achievements
Rank 1
Answers by
blablabla
Top achievements
Rank 1
Share this question
or