Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 ASP.NET4.0
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>                                                                                   
                       </asp:TemplateField> 
                       <asp:TemplateField>                       
                           <ItemTemplate>
                               <asp:ImageButton ID="imgbtndelete" runat="server" ImageUrl="~/Images/delete.jpg" Height="30px" Width="30px"/>
                           </ItemTemplate> 
                           <FooterTemplate><asp:Button ID="btnfooter" runat="server" Text="Save" onclick="btnfooter_Click" /></FooterTemplate>                      
                       </asp:TemplateField>                                                  
                    </Columns></asp:GridView>
 
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 1:09am

1 solution

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

Solution 1

  Permalink  
v2
Comments
palcordis at 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
0 Sergey Alexandrovich Kryukov 474
1 Maciej Los 375
2 OriginalGriff 263
3 CPallini 214
4 Peter Leow 200
0 OriginalGriff 6,152
1 Sergey Alexandrovich Kryukov 5,312
2 Maciej Los 3,279
3 Peter Leow 3,184
4 DamithSL 2,490


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 7 Aug 2012
Copyright © CodeProject, 1999-2014
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