Ideally, we would go from this:
strArray(0) = "Ralph"
strArray(1) = "Johnston"
strArray(2) = "12/15/87"
to this (forgive the crude drawing):
| Ralph | Johnston | 12/15/87 |
I've had success getting values in with the code below, but this adds a new column onto the datagrid. What I want is to add data values into and existing column structure that I have in place. Thanks for your time.
Expand|Select|Wrap|Line Numbers
- Dim strArray() As String = {"Ralph"}
- Dim dt As New DataTable
- dt.Columns.Add("FirstName", GetType(String))
- Dim dr As DataRow = dt.NewRow
- dr("FileName") = strArray(0)
- dt.Rows.Add(dr)
- ' Set the datagrid's source
- Me.dgMain.DataSource = dt