Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Private Sub AddDataTable
  2. User = txtUser.Text
  3. Password = txtPass.Text
  4. Address = txtAddress.Text
  5.  
  6. 'add Row...
  7. dr(0) = User
  8. dr(1) = Password
  9. dr(2) = Address
  10. 'dt.Rows.Add(dr)
  11. dt.Rows.InsertAt(dr, Pos)
  12. Pos = Pos + 1
  13. End Sub
  14.  
  15. Private Sub btGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btGet.Click
  16. dgvUser.DataSource = dt
  17. End Sub
  18.  
  19. Private Sub btAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btAdd.Click
  20. AddDataTable()
  21. txtUser.Clear()
  22. txtPass.Clear()
  23. txtAddress.Clear()
  24. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement