+ Start a Discussion
sravusravu 

Need Help!!!!!! Urgent-- expand/collapse list in a visualforce page

Hi,

As ideas do not support subcategories, we have displayed the categories by hardcoding the super category. For example if we had categories x,y,z related to A and p,q,r related B. In the visualforce page we have displayed the categories as follows:

 

A

  x

  y

  z

B

 p

 q

 r

 

A & B are hardcoded. Now what I am trying to do is,  Initially when the page is loaded, I should display the list as follows


A

B

 

When I click on A, the display should change as follows

 

A

 x

 y

 z

B

 

i.e... When I click on A, the list should expand. Again when I click on it, it should collapse.

 

I tried all means, but not getting the exact idea how to accomplish this.

Anybody has any idea how to accomplish this task.

 

Thanks in Advance.

Best Answer chosen by Admin (Salesforce Developers) 
r_boyd_848r_boyd_848

I haven't worked with Ideas as we're focused on ISV development. But this article may help

 

http://developer.force.com/cookbook/recipe/show-a-collapsed-pageblocksection-by-default

 

And yes its shameless self promotion.  ;-)

 

To get what you want you'll need to create a visualforce page and rollup your sleves with jQuery. This article should help http://developer.force.com/cookbook/recipe/using-jquery-in-a-visualforce-page. No self promotion here.

All Answers

r_boyd_848r_boyd_848

I haven't worked with Ideas as we're focused on ISV development. But this article may help

 

http://developer.force.com/cookbook/recipe/show-a-collapsed-pageblocksection-by-default

 

And yes its shameless self promotion.  ;-)

 

To get what you want you'll need to create a visualforce page and rollup your sleves with jQuery. This article should help http://developer.force.com/cookbook/recipe/using-jquery-in-a-visualforce-page. No self promotion here.

This was selected as the best answer
sravusravu

Thanks for the reply. I will go through the article and let you know if it worked.

sravusravu

Hi,

The link you have provided really helped me and could get what was needed to me.