[Last Call] Learn how to a build a cloud-first strategyRegister Now


Insert a Summary row of Subtotals in ASP.NET 2.0 Gridview

Posted on 2007-08-03
Medium Priority
Last Modified: 2013-11-05
I want to know if it is possible to create a SubTotal Summary Row withing a ASP.NET Gridview that would subtotal a count of Records based on a column value changing.  Here is an example of what the Gridview Summary would look like.   In this example I have a Gridview that displays a list of Work Orders from a Work Order Entry Application.   The query support the Gridview sorts the tickets by STATUS field.  So What I want to do is that at the end of each status type I want to subtotal the count and create like a formatted footer, say with Black Background and White forecolor.   Here is an example of what it might look like
Gridview Header --> Status   Date Opened  Desc
Rows ----------->      Open     8/1/2007         Fix CPU Error
                                 Open      8/2/2007         Undo formatting Changes
Summary Row -->   Total Work Orders with Open Status: 2   (This is the row I want inserted & formatted
                                 Hold        9/3/2007        Install new software
                                 Hold        9/4/2007        Move to HDQ
Summary Row -->   Total Work Orders with Hold Status: 2   (Again Summaries Next Grouping

I hope this gives a clear enough picture of what I am looking for.  I basiclly want to replicate a Crystal Report type functionality where the Gridview does  a summary on the GroupBY breakpoint.

Would like some assistance in what the best approach to this might be or if it is even possible in the Gridview.  I want to use the Gridview because of the sorting and Pageing features is has.  

Any help would be appreciated.
Question by:jholmes724
LVL 14

Accepted Solution

chinu1310 earned 1500 total points
ID: 19629912

Author Comment

ID: 19630490
I will try this.  I am not sure that I can insert multiple footer rows with in one GridView, as I need a summary (footer) everytime a grouping changes, but I will give this a try and see if it works. Thank you this looks like a good article to work from.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

829 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