Click here to Skip to main content
11,487,406 members (70,302 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET4.0
about sub footer and custom footer (gridview)

Hi, I want to make a gridview that would looked like this:

[country] [item name] [sales]
Japan ItemA xxxx
Japan ItemB xxxx
Japan ItemC xxxx
[total ] xxx

America ItemA xxxx
[total ] xxxx

China ItemB xxxx
China ItemC xxxx
[total ] xxxx

[total] ItemA xxxxxx
[total] ItemB xxxxxx
[total] ItemC xxxxxx

How to add subfooter in gridview?
Posted 30-Jul-12 20:18pm
Edited 30-Jul-12 20:24pm
Kenneth Haugland at 31-Jul-12 1:28am
Looks a lot like you need grouping
Sandeep Mewara at 31-Jul-12 14:20pm
I see this question a direct copy-paste from here:

Anything you want to add to it?

1 solution

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

Solution 1

I would use a nested grid here, so that each row renders the list of countries in the nested grid, then the total underneath. A repeater makes this easier to control, but, it gives you a lot less for free.

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 9,193
1 OriginalGriff 8,287
2 Sascha Lefèvre 3,334
3 Maciej Los 2,946
4 Richard Deeming 2,370

Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 31 Jul 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