23/02/2014, 23:23
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If DAramaDataGridView1.Rows.Count = 0 Then
Else
Dim counter As Integer = DAramaDataGridView1.CurrentRow.Index + 1
Dim nextRow As DataGridViewRow
If counter = DAramaDataGridView1.RowCount Then
nextRow = DAramaDataGridView1.Rows(0)
Else
nextRow = DAramaDataGridView1.Rows(counter)
End If
DAramaDataGridView1.CurrentCell = nextRow.Cells(1)
nextRow.Selected = True
DAlfabetikTextBox1.Text = IIf(IsDBNull(DAramaDataGridView1.CurrentRow.Cells(2).Value), "", DAramaDataGridView1.CurrentRow.Cells(2).Value)
DAlfabetikTextBox2.Text = IIf(IsDBNull(DAramaDataGridView1.CurrentRow.Cells(3).Value), "", DAramaDataGridView1.CurrentRow.Cells(3).Value)
DAlfabetikTextBox3.Text = IIf(IsDBNull(DAramaDataGridView1.CurrentRow.Cells(4).Value), "", DAramaDataGridView1.CurrentRow.Cells(4).Value)
End If
End Sub
Bu şekilde datagridin verilerini otomatik seçim yaptırtıyorum. Fakat datagriddeki verilerin son satırınıda yaptıktan sonra durmasını nasıl sağlarım ?