i just want to display datagrid value to label but i am getting problem after passing ten line.
Label1.Text = Me.DataGridView1.CurrentRow.Cells(0).Value.ToString.Trim Private Sub DataGridView1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseClick
Label2.Text = DataGridView1.CurrentRow.Cells(1).Value.ToString
Label3.Text = DataGridView1.CurrentRow.Cells(2).Value.ToString
Label4.Text = DataGridView1.CurrentRow.Cells(3).Value.ToString
Label5.Text = DataGridView1.CurrentRow.Cells(4).Value.ToString
Label6.Text = DataGridView1.CurrentRow.Cells(5).Value.ToString
Label7.Text = DataGridView1.CurrentRow.Cells(6).Value.ToString
Label8.Text = DataGridView1.CurrentRow.Cells(7).Value.ToString
Label9.Text = DataGridView1.CurrentRow.Cells(8).Value.ToString
Label10.Text = DataGridView1.CurrentRow.Cells(9).Value.ToString
Label11.Text = DataGridView1.CurrentRow.Cells(10).Value.ToString
Label12.Text = DataGridView1.CurrentRow.Cells(11).Value.ToString
Label13.Text = DataGridView1.CurrentRow.Cells(12).Value.ToString
Label14.Text = DataGridView1.CurrentRow.Cells(13).Value.ToString
Label15.Text = DataGridView1.CurrentRow.Cells(14).Value.ToString
Label16.Text = DataGridView1.CurrentRow.Cells(15).Value.ToString
Label17.Text = DataGridView1.CurrentRow.Cells(16).Value.ToString
Label18.Text = DataGridView1.CurrentRow.Cells(17).Value.ToString
End Sub
after the label10.text i get error like this when clicking the datagrid