473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sum of column in footer

Is there a way to sum all the columns values in a gridview and show it in
the footer of that column? anyone try this before? thanks!
Jun 30 '06 #1
4 1062
Hi,

you can do it by handling RowRataBound event of the GridView. Calculate sums
in it (as it's repeated for every row) and when GridViewRow's RowType is
Footer, place the sum value into it (for example by using a TemplateField
having Label in footer to which you set the sum, as it's Text value)

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Smokey Grindle" <no********@dontspam.net> wrote in message
news:ef**************@TK2MSFTNGP02.phx.gbl...
Is there a way to sum all the columns values in a gridview and show it in
the footer of that column? anyone try this before? thanks!

Jun 30 '06 #2

hello smokey

here's a working code example. hope it helps

http://authors.aspalliance.com/aspxt...databound.aspx

Jul 1 '06 #3

hello smokey

here's a working code example. hope it helps

http://authors.aspalliance.com/aspxt...databound.aspx

Jul 1 '06 #4
thanks everyone!

"ReyN" <rv*****@yahoo.com> wrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...

hello smokey

here's a working code example. hope it helps

http://authors.aspalliance.com/aspxt...databound.aspx

Jul 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: kaeli | last post by:
I have had a little free time lately to revisit a problem I have with the 3 column layout plus a header and footer. See this example: http://glish.com/css/7.asp There is a header and 3...
2
by: | last post by:
Hello All, I am having a lot of difficulty trying to bind a templated column, that is programmatically created for a datagrid, to a datasource column. I have a datasource containing 2 columns,...
0
by: tshad | last post by:
I have a table which works fine using the following templates: ********************************************************************************** <asp:TemplateColumn HeaderText="Answer">...
7
by: Andrew | last post by:
I've been struggling to achieve the following layout for some time now and I'm not getting anywhere. I've tried several approaches including floats & absolute positioning and none seem to work,...
9
by: Xavier van Unen | last post by:
Hi guys and gals, I'm working on a 2 column CSS layout (for an ordering system) in which it isn't a priori known which of the two columns will be the longest, that depends on the (script...
3
by: Joel Byrd | last post by:
I've got a 2-column tableless layout and I'm using floats to render the columns. Here are the basic style definitions for the 2 columns: #left_col { width: 59%; float: left; clear: left; }
10
by: Günther Steinmetz | last post by:
I am trying to build a page with a header, 2 columns in the middle and a footer. The left column contains the menu, the right column the real content. Instead of giving the content column a left...
2
by: Remy | last post by:
Hi I would like to put a link into the Footer of the first column of an ASP.NET 2.0 GridView. By first column I mean the column where it normally displayes the Edit and Delete link. I've built...
2
by: Eric Lindsay | last post by:
I hope someone can help, before I start thinking tables have a lot of merit after all. I am trying to achieve a two column layout, with source code div order main content, right side navigation,...
3
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.