Hello good Teachers

I have a datagridview with 3 columns. the second column is a read only . When I leave column 1 I would like to go directly to column 3.

For this, I got following codes from somewhere but I need these codes in vb.net format, please help or suggest some other method

Code Snippet
void dataGridView1_KeyDown(object sender, KeyEventArgs e)

        {

            if (e.KeyData == Keys.Tab)

            {

                if (this.dataGridView1.CurrentCell.ColumnIndex == 0)

                {

                    this.dataGridView1.CurrentCell = this.dataGridView1[2, this.dataGridView1.CurrentCell.RowIndex];

                    e.Handled = true;

                }

            }

        }

Take a look at this thread - http://www.daniweb.com/forums/thread254272.html

....
IF e.KeyData = Keys.Tab Then
   IF Me.dataGridView1.CurrentCell.ColumnIndex = 0 Then
       Me.dataGridView1.CurrentCell = this.dataGridView1(2, Me.dataGridView1.CurrentCell.RowIndex)
       e.Handled = true
   End IF
END IF
....
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.