G
Guest
I am trying to copy some data from one datagrid to another. The first
datagrid containing data is called DocList. The blank Datagrid that I am
trying to copy some data to is called DataGrid1.
Please tell me the simplist way to loop through an existing datagrid, access
it's columns and rows, then copy parts of that data to a blank Datagrid1.
Thank you.
What I've tried unsuccessfully:
....
Dim dt As DataTable
Dim dr As DataRow
DataGrid1.DataSource = dt
Dim DocListGridItem As DataGridItem
For Each DocListGridItem In DocList.Items
dr = dt.NewRow
dt.Rows.Add(dr)
dr.Item(0) = DocListGridItem.Cells(0).Text()
Next
....
datagrid containing data is called DocList. The blank Datagrid that I am
trying to copy some data to is called DataGrid1.
Please tell me the simplist way to loop through an existing datagrid, access
it's columns and rows, then copy parts of that data to a blank Datagrid1.
Thank you.
What I've tried unsuccessfully:
....
Dim dt As DataTable
Dim dr As DataRow
DataGrid1.DataSource = dt
Dim DocListGridItem As DataGridItem
For Each DocListGridItem In DocList.Items
dr = dt.NewRow
dt.Rows.Add(dr)
dr.Item(0) = DocListGridItem.Cells(0).Text()
Next
....