J
John Mason
Hi,
I am trying to find out if there is a way to set the headertext of the
boundfield column belonging to a detailsview control (ASP.NET 2.0), from
code.
<asp:BoundField HtmlEncode="false" DataFormatString="{0:###0.00}"
DataField="wage_cash" HeaderText='<%# Format_Header("wage1") %>'
SortExpression="wage_cash" />
The above example doesn't work:
"Databinding expressions are only supported on objects that have a
DataBinding event."
I would like to set the headertext within the DetailsView_PreRender sub,
so that the header displays the current financial year.
I'd prefer not to convert the above to a TemplateField column, because
of the formatting used - DataFormatString="{0:###0.00}"
Any help (with vb.net examples) would be especially appreciated!
Thanks,
John.
I am trying to find out if there is a way to set the headertext of the
boundfield column belonging to a detailsview control (ASP.NET 2.0), from
code.
<asp:BoundField HtmlEncode="false" DataFormatString="{0:###0.00}"
DataField="wage_cash" HeaderText='<%# Format_Header("wage1") %>'
SortExpression="wage_cash" />
The above example doesn't work:
"Databinding expressions are only supported on objects that have a
DataBinding event."
I would like to set the headertext within the DetailsView_PreRender sub,
so that the header displays the current financial year.
I'd prefer not to convert the above to a TemplateField column, because
of the formatting used - DataFormatString="{0:###0.00}"
Any help (with vb.net examples) would be especially appreciated!
Thanks,
John.