Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skipping Hidden datagrid columns 1

Status
Not open for further replies.

zatch

MIS
Joined
Oct 11, 2001
Messages
75
Location
US
I have a custom datagrid with hidden columns (.Width = 0) When I tab through the datagrid, the cursor stops in these columns even though they are hidden (disappears.) I can't seem to find a way to make the tab skip these columns.

Anyone have a good method of accomplishing this?

Thanks.
 
Thanks a lot. That showed me just where to go. Here's what I ended up with where 7 - 14 is the range of my hidden columns:

Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged

Select Case Me.DataGrid1.CurrentCell.ColumnNumber

Case 7
Me.DataGrid1.CurrentCell = New DataGridCell(Me.DataGrid1.CurrentRowIndex + 1, 0)

Case 14
Me.DataGrid1.CurrentCell = New DataGridCell(Me.DataGrid1.CurrentCell.RowNumber, 6)

End Select

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top