Click here to Skip to main content
11,410,536 members (55,895 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET4.0
hi firends
how create footer in grid view that to sum filed gridview

and create header that write up header "all list user"
Posted 25-Sep-12 20:25pm
Comments
Ankur\m/ at 26-Sep-12 2:14am
   
Does it not already have such properties? Have you tried (or at least searched) enough?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use some other controls, like Label. Dock them, say, to the top and bottom of the parent panel, fill the grid view in the middle. Re-calculate your values as you change any cell and assign new values to the texts of those labels.

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

Solution 2

Try following code in your .aspx file.


<asp:gridview id="Griddealers" runat="server" bordercolor="#55A0FF" xmlns:asp="#unknown">
 <columns>
<asp:templatefield headertext="all list user" headerstyle-cssclass="grdheadermster" visible="True">
</asp:templatefield>
 
<asp:templatefield footertext="sum" headerstyle-cssclass="grdheadermster" visible="True">
 <itemtemplate>
   <asp:label id="lblfid" runat="server" cssclass="labelstyle" text="<%# bind("Sum") %>">
  Permalink  

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 8,755
1 OriginalGriff 6,915
2 Maciej Los 3,390
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | Last Updated 28 Sep 2012
Copyright © CodeProject, 1999-2015
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