Solved

ASP.net GridView with totals at the bottom

Posted on 2016-10-28
2
58 Views
Last Modified: 2016-10-28
Hi

I know that this is probably not possible but is there any way to show the totals of all numeric columns in a bound GridView in ASP.net?

Thanks
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41863494
yes, it's possible. you can do it in the RowDataBound event of your gridview and look for row type equals to footer, like:

protected void yourGridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.Footer)
            {
                  e.Row.Cells[1].Text = "yourCalculated Total...";
             }
     }

Open in new window

further reading:

GridView Examples for ASP.NET 2.0: Displaying Summary Data in the Footer
https://msdn.microsoft.com/en-us/library/ms972833.aspx
1
 

Author Closing Comment

by:Murray Brown
ID: 41863622
Thanks very much
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question