Click here to Skip to main content
15,892,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

I don't know if it is possible to do this or not, but I am open to new suggestions as well.

What I am trying to accomplish is;

I have a gridview and it returns X amouth of row. X may change depending on the data pulled from the db. I want each row to appear like a collapsible panel or a pane of a accordion ajax control. Is it possible to do this or something similar on the fly like adding the panes of the accordian dynamically?

If you can provide me some code, tutorial, or links.. I will be glad. Thanks.
Posted
Updated 6-Apr-11 13:53pm
v3

keep the grid view in a panel with scroll bars enabled, and did you try using ajaxtoolkit CollapsiblePanelExtender. It takes the id of the panel which we have to toggle,
<ajaxtoolkit:collapsiblepanelextender id="collapsible" targetcontrolid="IdPanelToCollapse" .....="" xmlns:ajaxtoolkit="#unknown"></ajaxtoolkit:collapsiblepanelextender> 
 
Share this answer
 
v2
Comments
Orcun Iyigun 6-Apr-11 21:00pm    
Well wont that collapse all the gridview instead of row by row?
Ramu Sangabathula Original 6-Apr-11 23:11pm    
you mean to say..., you have gridview in side a gridview? if that is the case, check this link http://forums.asp.net/t/1294904.aspx/1
Orcun Iyigun 8-Apr-11 15:09pm    
Thanks for your help though I found the solution. explained in the answer below.
Ramu Sangabathula Original 8-Apr-11 19:22pm    
I am glad that you found solution, but i have a question, you said for each list item you create a pane, i don't know but.., the purpose of accordian is to group similar items to one group. but should be fine as long as you know what you are doing.
Ok so I found the solution by adding the panes dynamically. I read all the rows of the gridview and insert each row to a list. So for each list item I create a pane. Referance for dynamically adding the panes is in this link[^]
 
Share this answer
 

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