0

i want to initialize my id column of my databse tables by 1 again when i empty the table..i tried this code but it is not working..

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
02
        Dim i As Integer
03

04
        i = DataGridView1.CurrentRow.Index
05
        TxtId.Text = DataGridView1.Item(0, i).Value
06
        TxtUsername.Text = DataGridView1.Item(1, i).Value
07
        TxtPassword.Text = DataGridView1.Item(2, i).Value
08

09

10
        [b]If DataGridView1.Item(0, 0).Value = vbEmpty Then
11
            DataGridView1.Item(0, 0).Value=initialize
12
[/b]
13

14
End If
2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by pratik65
0

but where do i use this code in my code .i am not getting how to excute this command in my table..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.