How do I get to an ObjectDataSource's underlying data/schema. I thought it
would have a DataSet property but I can't find it. So how do you find out
about the data and/or the schema used to populate a bound control such as the
GridView?
Specifically I want to do something like this...
For Each BoundControl in GridView1
If the DataType of the BoundControl is DateTime Then
BoundControl.HtmlEncode="false"
BoundControl.DataFormatString="{0:d}"
End If
Next BoundControl
I thought I would find a property on the BoundControl that would lead me to
a DataRow object. Or otherwise perhaps I could use the BoundControl's ordinal
to find the corresponding DataColumn from the DataSet's DataTable object. But
I can't see how to do any of these things.