Click here to Skip to main content
15,031,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 10-May-13 2:43am
v2
Comments
Mojtaba Eng 10-May-13 9:03am
   
a Treeview with gridview Nodes .
   
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 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 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)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900