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

I am using asp.net 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"/>
                    <Columns>
                        <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" 
                            SortExpression="Status"/> 
                        <asp:TemplateField HeaderText="Actions">
                            <ItemTemplate>                
                                <asp:ImageButton ID="imgbtndetails" runat="server" ImageUrl="~/Images/edit.jpg" Height="30px" Width="30px" OnClick="imgbtn_Click" />                                             
                            </ItemTemplate>

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,
palcordis
Posted 7-Aug-12 2:09am

1 solution

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

Solution 1

  Permalink  
v2
Comments
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
Web01 | 2.8.160426.1 | Last Updated 7 Aug 2012
Copyright © CodeProject, 1999-2016
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