ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Grid group by Name with Total footers and export to excel
Title:
B
I
{code}
?
Hi I have a particular requirement of a grid in which the format should look as below:- *Name: Name1 (want to group by Name)* ------------------------------------------------------------------ Name | Phase Name | Stage | Number Of Cases| Amount |Avg. Days (headers/Columns) Name1 | Qualification | 1.2 | 5 | 50 | [ ] Name1 | Qualification | 1.3 | 4 | 30 | [ rows ] Name1 | Negotiation | 2.1 | 7 | 40 | [ ] ------------------------------------------------------------------ ... | Total | | 16 | 120 | (footer) *Name: Name2 (want to group by Name)* ------------------------------------------------------------------ Name | Phase Name | Stage | Number Of Cases| Amount |Avg. Days (headers/Columns) Name2 | Qualification | 1.2 | 5 | 50 | [ ] Name2 | Qualification | 1.3 | 4 | 30 | [ rows ] Name2 | Negotiation | 2.1 | 7 | 40 | [ ] ------------------------------------------------------------------ ... | Total | | 16 | 120 | (footer) *Total Summary* Phase Name | Stage | Number Of Cases | Amount | Avg. Days. ------------------------------------------------------------ Qualification | 1.2 | 10 | 100 | Qualification | 1.3 | 8 | 60 | Negotiation | 2.1 | 14 | 80 | ------------------------------------------------------------ Total | 32 | 240 | This Total summary section I want to show inside the last row and want to download the same format in excel. Is it possible
Save Changes
Cancel
SalesARM
asked at 23 Jan 2020
try going here: https://demo.aspnetawesome.com/GridExportToExcelDemo group the grid by Person and after click "export grid to excel"
at 23 Jan 2020
Omu
Yes that seems fine, but please look at *total summary* section , can it be part of the same grid, there is no 'name' column in it and this section has to be at the bottom of the grid showing total result, or is there any other way : can I show this two sections in two grids and when I click on download button, it downloads excel with two sheets, sheet one with name grouping grid and sheet two showing total summary grid.
at 23 Jan 2020
SalesARM
obviously in the same grid you need to have the same columns. To create excel docs with 2 sheets you'll have to look at npoi docs. NPOI is the lib we use in our demos, but your free to use any other one.
at 23 Jan 2020
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK