C
Craig G
i have a filter that runs on a dataset
Dim drFilteredRows As DataRow()
drFilteredRows = dsResults.Tables(0).Select(strFilter)
This works grand and returns records
but i want to add these rows into a datatable setup as follows
Dim dtDataTable As New DataTable
dtDataTable.Columns.Add("Code")
dtDataTable.Columns.Add("Description")
i thought i could just do the following
dtDataTable.Rows.Add(dsResults.Tables(0).Select(strFilter))
but this doesnt seem to work because when i then try to bind it to a grid
grdGrid.DataSource = dtDataTable
grdGrid.DataBind()
it simply shows the data as "System.data.datarow" in the first cell of the grid for each row
Dim drFilteredRows As DataRow()
drFilteredRows = dsResults.Tables(0).Select(strFilter)
This works grand and returns records
but i want to add these rows into a datatable setup as follows
Dim dtDataTable As New DataTable
dtDataTable.Columns.Add("Code")
dtDataTable.Columns.Add("Description")
i thought i could just do the following
dtDataTable.Rows.Add(dsResults.Tables(0).Select(strFilter))
but this doesnt seem to work because when i then try to bind it to a grid
grdGrid.DataSource = dtDataTable
grdGrid.DataBind()
it simply shows the data as "System.data.datarow" in the first cell of the grid for each row