Reputation: 185
<asp:BoundField HeaderText='<%=scheduledLogsDateCaptionValue%>'
DataField="DateString"
ItemStyle-Width="15%"
ItemStyle-cssclass="logtd"
ItemStyle-HorizontalAlign="Right"/>
Header text shows as <%=scheduledLogsDateCaptionValue%>
on the site rather than the actual value, anyone know a fix?
Upvotes: 0
Views: 38
Reputation: 1620
If you want to dynamically change the Header Text of the GridView
you can do it in the code behind like
Gridview1.Columns[ColumnIndex].HeaderText = ds.Tables[0].Rows[0]["scheduledLogsDateCaptionValue"].ToString();
Upvotes: 0
Reputation: 18769
isn't that just the header value, so you would just add some free text in there and then have DataField=scheduledLogsDateCaptionValue
?
<asp:BoundField HeaderText="Scheduled date"
DataField="scheduledLogsDateCaptionValue"
ItemStyle-Width="15%"
ItemStyle-cssclass="logtd"
ItemStyle-HorizontalAlign="Right"/>
Upvotes: 1