Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi All,
 
Today I got a request to publish the excel report using asp.net gridview.
 
format of report is like (below mentioned)
 
----------------------------------------------------------------------------------
Category 1 | Category 2 | Category 3
----------------------------------------------------------------------------------
S Category1 | S. Cat2 | S. Cat3 | S. Cat4| ....etc
----------------------------------------------------------------------------------
 
Category and Sub categories are dynamic fields... I have to pull them from database.
Database Table structure is given below
-------------------------------
CategoryID | Sub CategoryID
-------------------------------
1 | 1
1 | 2
1 | 3
2 | 1
2 | 2
--------------------------------...etc.
 
Please advice the best way to do this.
Posted 10-May-13 3:41am
s_jadli237
Edited 10-May-13 3:43am
(no name)67.4K
v2
Comments
Mojtaba Mahdavi Eng at 10-May-13 9:03am
   
a Treeview with gridview Nodes .
Sergey Alexandrovich Kryukov at 10-May-13 9:36am
   
Not so easy. Those gridview nodes will behave as unrelated grid views, they won't form one common grid. This is actually a real problem.
—SA
Balimusi at 10-May-13 9:40am
   
You can use a GridView that is nested inside of a DataList. Let the DataList be the container of the Category and place the Sub-category data inside the GridView.
Sunasara Imdadhusen at 21-May-13 3:56am
   
You should use Gird within Grid (nested grid)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 OriginalGriff 120
3 PIEBALDconsult 110
4 BillWoodruff 85
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2014
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