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:BoundFie ld HtmlEncode="fal se" DataFormatStrin g="{0:###0.00 }"
DataField="wage _cash" HeaderText='<%# Format_Header(" wage1") %>'
SortExpression= "wage_cash" />
The above example doesn't work:
"Databindin g expressions are only supported on objects that have a
DataBinding event."
I would like to set the headertext within the DetailsView_Pre Render 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 - DataFormatStrin g="{0:###0.00 }"
Any help (with vb.net examples) would be especially appreciated!
Thanks,
John.
*** Sent via Developersdex http://www.developersdex.com ***