How to create a datalist table layout in vb?

I am using vb .net

I have a following data:

DataBase: databaseName
Table : tableName

--------------------
| ID | randomNames |
--------------------
| 1  | name1       |
| 2  | name2       |
| 3  | name3       |
| 4  | name4       |
| 5  | name5       |
| 6  | name6       |
--------------------

I want to take all the data from database and display datalist table in the following format.

------------------------
|name1 | name2 | name3 |
|name4 | name5 | name6 |
------------------------

I set up the code but having hard time understanding how to format it like a table.

    Try
        sqlConn.Open()

        Dim cmd = New SqlCommand(SelectQuery, sqlConn)
        reader = cmd.ExecuteReader()

        While reader.Read()
            dr = dt.NewRow()
            dr(0) = reader(1)
            dt.Rows.Add(dr)

            'return a DataView to the DataTable
            CreateDataSource = New DataView(dt)
        End While
    Catch ex As Exception
        ErrorL.Text = "Error1 - Can't connect to database.<br/>" & ex.Message
    End Try

How does this differ from https://www.daniweb.com/programming/web-development/threads/505507/how-to-create-a-datalist-table-layout-in-vb finds you pasting what looks like HTML in place of VB code.

Here your tags are not listing VB.net but asp and asp.net so I would be taking a huge leap that you were writing some web server in vb.net.

Let's keep in mind that putting a table on a vb form has many prior discussions so I can't think that is your question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.