Click here to Skip to main content
12,255,255 members (59,873 online)
Rate this:
 
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 2:41am
s_jadli240
Edited 10-May-13 2:43am
CHill60144.1K
v2
Comments
Mojtaba Mahdavi 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


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