Click here to Skip to main content
12,887,548 members (27,127 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0 ASP.NET4
Hi All,

I am using Gridview control.
I attached datasource to Gridview to display records in Gridview.

Below is my Gridview aspx
<asp:GridView ID="GridView1" runat="server" Width="100%"
                    AutoGenerateColumns="False" DataSourceID="SqlDataSource1" CellPadding="4" 
                    ForeColor="#333333" GridLines="None">
                    <AlternatingRowStyle BackColor="White"/>
                        <asp:BoundField DataField="S.No" HeaderText="S.No" SortExpression="S.No" ItemStyle-HorizontalAlign="Right" />
                        <asp:BoundField DataField="Currency Name" HeaderText="Name"
                            SortExpression="Currency Name"/>
                        <asp:BoundField DataField="Currency Code" HeaderText="Code" 
                            SortExpression="Currency Code"/>
                        <asp:BoundField DataField="Currency Symbol" HeaderText="Symbol" 
                            SortExpression="Currency Symbol"/>
                        <asp:BoundField DataField="Status" HeaderText="Status" 
                        <asp:TemplateField HeaderText="Actions">
                                <asp:ImageButton ID="imgbtndetails" runat="server" ImageUrl="~/Images/edit.jpg" Height="30px" Width="30px" OnClick="imgbtn_Click" />                                             
                               <asp:ImageButton ID="imgbtndelete" runat="server" ImageUrl="~/Images/delete.jpg" Height="30px" Width="30px"/>
                           <FooterTemplate><asp:Button ID="btnfooter" runat="server" Text="Save" onclick="btnfooter_Click" /></FooterTemplate>                      

Now Gridview is displaying 2 records from database.Now I want add records from footer template.
On A button click I want to display footer template below.
Can anyone tell me the design to display Footer template to enter new records.

Thank you,
Posted 7-Aug-12 1:09am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

palcordis 8-Aug-12 6:16am
Thank you,

I have one more query,I am using Boundfield property to fetch the data from datasource.

I want the footer template to be displayed below the boundfield item.
If I use footer template in Template field it is displaying footer in different columns.But I want to footer template below the Boundfield.

Could please tel me how can I achieve this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 7 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100