i want to set tabindex for datagridview cell how to solve this problems
Printable View
i want to set tabindex for datagridview cell how to solve this problems
[ Split Thread ]
As far as I'm aware, you can't change the tab order of cells in a DataGridView - the DataGridViewCell does not have a TabIndex property to start with.
Is there any reason you wish to do so - I can't think of a situation where you want to go in any other order than Row and Columns or Columns and Rows...
You could always manipulate the DataGridView.CurrentCell property upon pressing of the Tab key, something like :
Of course, this assumes you already determined that Tab was pressed.Code:DataGridView1.CurrentCell = DataGridView1.Item(column, row)
But why is this necessary ¿
One way is that you try to capture KeyDown event on DataGridView and then manipulate the CurrentCell using Hannes idea. The other way might be to override 'ProcessCmdKey' method on grid.