header text in datagrid
Hi
How to display header text dynamically in datagrid means
based on condition i want to dispaly the headet text.
here giving the example.
Below cntname is variable having the actual header text.
<asp:datagrid id="grd" Runat="server"> <Columns>
<asp:TemplateColumn ItemStyle-Width="4px" HeaderText=<%=cntname%> HeaderStyle-Font-Size="10px" ItemStyle-Font-Size="8">
</asp:TemplateColumn>
when i do this its diplaying blank header eventhough variable cntname having value.
pl help me
thanks
|