Hoping somebody can help me here. I am following an example posted by Telerik on how to do this in this forum. I am getting "" returned as the value for every column value (.Text). All of my grid columns are GridtTmplateColumns and the column values are labels within the template.
How do accomplish this with GridTemplateColumns? I have been struggling with this for the entire day. Can I somehow use item.findcontrol here?
Dim dtRecs As DataTable = New DataTable
For Each col As GridColumn In rgbt.Columns
If (col.ColumnType = "GridTemplateColumn") Then
Dim colstring As String
colstring = col.UniqueName
dtRecs.Columns.Add(colstring)
End If
Next
For Each item As GridDataItem In rgbt.Items
Dim newRow As DataRow = dtRecs.NewRow()
For Each column As GridColumn In rgbt.Columns
If (column.ColumnType = "GridTemplateColumn") Then
newRow(column.UniqueName) = item.(column.UniqueName).Text 'RETURNS ""
dtRecs.Rows.Add(newRow)
End If
Next
Next
Thanks!