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

How to Set TabIndex=-1 for Expand Collapse Column on Server Side?

2 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 10 May 2010, 08:00 PM
The title says it all.  I have a hierarchial grid and for tabbing reasons, I only want textboxes to get focus.  I've set the TabIndex to -1 for all my my gridbuttoncolumns and gridclientselectcolumns in the prerender() event.  Expand/Collapse column is the only column left that I need to deal with like this.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 11 May 2010, 03:20 PM
Is this even possible?  I could really use some help.
0
Rob
Top achievements
Rank 1
answered on 11 May 2010, 04:36 PM
After delving deep into the help file, I came up with this working solution:

 
    Protected Sub dg_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles dg.ItemCreated  
        If TypeOf e.Item Is GridDataItem Then 
            Dim gridItem As GridDataItem = CType(e.Item, GridDataItem)                              
            Dim cell As TableCell = gridItem("ExpandColumn")  
            CType(cell.Controls(0), Button).TabIndex = -1            
        End If 
    End Sub 
Tags
Grid
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Share this question
or