S
Steve Harclerode
Hi,
I'm trying to get my DataGrid to show headers and footers when no rows are
returned from the datasource. Below is code that shows the first
TemplateField. Is there an easy way to get at least the footer to show? I
want to be able to insert a new row using the footer. Thanks...
<asp:GridView ID="gvMaterials" runat="server"
AutoGenerateColumns="False"
DataSourceID="dsMaterials" ShowFooter="True" Width="100%"
AutoGenerateEditButton="True">
<Columns>
<asp:TemplateField HeaderText="Material:">
<FooterTemplate>
<asp:TextBox ID="txtDescription"
runat="server"></asp:TextBox>
</FooterTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDescription" runat="server"
Text='<%# Bind("Description") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDescription" runat="server" Text='<%#
Bind("Description") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
[etc...]
I'm trying to get my DataGrid to show headers and footers when no rows are
returned from the datasource. Below is code that shows the first
TemplateField. Is there an easy way to get at least the footer to show? I
want to be able to insert a new row using the footer. Thanks...
<asp:GridView ID="gvMaterials" runat="server"
AutoGenerateColumns="False"
DataSourceID="dsMaterials" ShowFooter="True" Width="100%"
AutoGenerateEditButton="True">
<Columns>
<asp:TemplateField HeaderText="Material:">
<FooterTemplate>
<asp:TextBox ID="txtDescription"
runat="server"></asp:TextBox>
</FooterTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDescription" runat="server"
Text='<%# Bind("Description") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDescription" runat="server" Text='<%#
Bind("Description") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
[etc...]