J
John
Hi
I have a hidden (visible=false) column on a gridview bound to a sql server
table. I am trying to access the field as;
For Each row As GridViewRow In grdEvents.Rows
If row.RowType = DataControlRowType.DataRow Then
bf = CType(row.Cells(row.Cells.Count - 1).FindControl("event id"),
BoundField)
End if
Next
but I get the 'System.Web.UI.Control' cannot be converted to
System.Web.UI.WebControls.BoundField' error. When I try to access it using
row.Cells(12).Text then it returns a blank value.
How can I access the relevant gridview column?
Thanks
Regards
I have a hidden (visible=false) column on a gridview bound to a sql server
table. I am trying to access the field as;
For Each row As GridViewRow In grdEvents.Rows
If row.RowType = DataControlRowType.DataRow Then
bf = CType(row.Cells(row.Cells.Count - 1).FindControl("event id"),
BoundField)
End if
Next
but I get the 'System.Web.UI.Control' cannot be converted to
System.Web.UI.WebControls.BoundField' error. When I try to access it using
row.Cells(12).Text then it returns a blank value.
How can I access the relevant gridview column?
Thanks
Regards