G
Guest
I'm not sure why my GridView isn't showing the HeaderText 'Title' at the top
of my grid when rendered in my aspx:
<asp:GridView
ID="gvPodcasts"
runat="server"
AllowPaging="true"
PageSize="3"
AllowSorting="true"
AutoGenerateColumns = "False"
BackColor="#FFFCC5"
BorderColor="Tan"
BorderWidth="1px"
CellPadding="2"
ForeColor="#000000"
GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="hlTitle" HeaderText="Title"
runat="server" Text='<%#((Podcast)Container.DataItem).Title %>'
NavigateUrl='<%#((Podcast)Container.DataItem).URL %>'
SortExpression='<%#((Podcast)Container.DataItem).Title %>'/>
<br /><br />
<asp:Label ID="lblDescription" runat="server"
Text='<%#((Podcast)Container.DataItem).Description %>'></asp:Label>
<br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#000000" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#EFBA67" Font-Bold="True" />
<AlternatingRowStyle BackColor="#F8F8F7" />
of my grid when rendered in my aspx:
<asp:GridView
ID="gvPodcasts"
runat="server"
AllowPaging="true"
PageSize="3"
AllowSorting="true"
AutoGenerateColumns = "False"
BackColor="#FFFCC5"
BorderColor="Tan"
BorderWidth="1px"
CellPadding="2"
ForeColor="#000000"
GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="hlTitle" HeaderText="Title"
runat="server" Text='<%#((Podcast)Container.DataItem).Title %>'
NavigateUrl='<%#((Podcast)Container.DataItem).URL %>'
SortExpression='<%#((Podcast)Container.DataItem).Title %>'/>
<br /><br />
<asp:Label ID="lblDescription" runat="server"
Text='<%#((Podcast)Container.DataItem).Description %>'></asp:Label>
<br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#000000" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#EFBA67" Font-Bold="True" />
<AlternatingRowStyle BackColor="#F8F8F7" />