I am trying to populate a datagridview from a datatable but I don't want to bind it to the datatable. With the below code it's only displaying data in the last row (see attached picture). There are 5 records in the table. When I single step through the code and watch the row count is changing and the data is changing.
Dim CheckUser As DataTable, intRow As Integer = 0
CheckUser = ReadDataFromDB("SELECT * FROM users;", False)
For Each row In CheckUser.Rows
If Not String.IsNullOrEmpty(row("
ue = row("UserID").ToString
lue = row("UserID").ToString
.Rows(.Rows.Count - 1).Cells("UserID").Value = row("UserID").ToString
intRow += 1