A
Arpan
How do I format only the Header text (column names) in a DataGrid? Consider the following code snippet:
<aspataGrid id="myDataGrid" GridLines="both" AutoGenerateColumns="false" runat="server">
<Columns>
<asp:TemplateColumn HeaderText="Name">
<ItemTemplate>
<asp:Label id="fname" Text=<%# Container.DataItem("FirstName") %> runat="server"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderText="Address" DataField="Address" runat="server"/>
<asp:BoundColumn HeaderText="City" DataField="City" runat="server"/>
.............
.............
.............
How do I format (like make it bold or italicize) the Headers "Name","Address" & "City"? I want to format ONLY the Headers, not anything else that the DataGrid displays.
Please note that I am working on Windows 2000 Professional.
Thanks,
Arpan
<aspataGrid id="myDataGrid" GridLines="both" AutoGenerateColumns="false" runat="server">
<Columns>
<asp:TemplateColumn HeaderText="Name">
<ItemTemplate>
<asp:Label id="fname" Text=<%# Container.DataItem("FirstName") %> runat="server"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderText="Address" DataField="Address" runat="server"/>
<asp:BoundColumn HeaderText="City" DataField="City" runat="server"/>
.............
.............
.............
How do I format (like make it bold or italicize) the Headers "Name","Address" & "City"? I want to format ONLY the Headers, not anything else that the DataGrid displays.
Please note that I am working on Windows 2000 Professional.
Thanks,
Arpan