Click here to Skip to main content
16,016,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
My Database table has 5 columns Below is my table my data.

SectionId SecName  ChapterId	ChapterName Duration
1	  Sec1	      1	          Chap1      2 Days
1	  Sec1        2	          Chap2      2 Days
1	  Sec1	      3	          Chap3      2 Days
2	  Sec2	      4	          Chap4      2 Days
2	  Sec2	      5	          Chap5      2 Days
3	  Sec3	      6	          Chap6      1 Day
3	  Sec3	      7	          Chap7      1 Day
4	  Sec4	      8	          Chap8      1 Day



I want table or gridview format like below


ChapterName	Duration	
Sec1		
Chap1	         2 Days	
Chap2	         2 Days	
Chap3	       2 Days	
Sec2		
Chap4	       2 Days	
Chap5	       2 Days	
Sec3		
Chap6	       1 Day	
Chap7	       1 Day	
Sec4		
Chap8	       1 Day



How can i display above format dynamically in aspx page

Thanks,
Sampath bejugama

[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 23-Apr-12 21:05pm
v2

1 solution

hii


I think you should go with Repeater control instead off gridview for giving table structure.

Repeater control allows to use html control inside templates.so you can give structure as you want and can use css and html tags.


If any doubt to work with repeater control then reply...


thanks
 
Share this answer
 
Comments
VJ Reddy 24-Apr-12 11:23am    
Good suggestion. 5!

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