P
Pete
Hi - In DetailsView I want to convert the bound <Fields> from tags to
code so the fields can be picked up from the schema. I tried
converting:
<asp:BoundField ReadOnly="True" HeaderText="CustomerID"
DataField="CustomerID" SortExpression="CustomerID"></asp:BoundField>
by using:
DetailsView1.Fields.Add(New BoundField)
DetailsView1.Fields(0).HeaderText = "CustomerID"
DetailsView1.Fields(0).SortExpression = "CustomerID"
but I that way can't set the BoundField's DataField or its ReadOnly
value. Help on how to convert to code would be very much appreciated.
-Pete
code so the fields can be picked up from the schema. I tried
converting:
<asp:BoundField ReadOnly="True" HeaderText="CustomerID"
DataField="CustomerID" SortExpression="CustomerID"></asp:BoundField>
by using:
DetailsView1.Fields.Add(New BoundField)
DetailsView1.Fields(0).HeaderText = "CustomerID"
DetailsView1.Fields(0).SortExpression = "CustomerID"
but I that way can't set the BoundField's DataField or its ReadOnly
value. Help on how to convert to code would be very much appreciated.
-Pete