Search code examples
asp.net.netgridviewaspxgridview

How to add a special row to `<asp:GridView>`?


I'd like to add a special row at the bottom of <asp:GridView>. The template of this row is different from the rows above. How can I make this?

enter image description here


Solution

  • You could use the footer template if you always want your 'add' row to be at the bottom of the table:

    <asp:TemplateField>
        <HeaderTemplate>
        </HeaderTemplate>
        <ItemTemplate>
        </ItemTemplate>
        <FooterTemplate>
    
        </FooterTemplate>
    </asp:TemplateField>