function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
coolKarnicoolKarni 

collapse and expand data within a column of a pageblocktable

Hi ,

 i have a requiremet i am not able to figure it out.

I am displaying a list of records within a pageblock table from a custom object..

 My requirement is that for a particular column in every row of the table have child records within that,so i need the expand and collapse property to be implemented within the table.such that whenclicked on the expand button the child records are displayed and when clicked again the records should hide. Is that possible, or is there any other solution to achieve this??. please let me know..

Thanks

Ispita_NavatarIspita_Navatar
In response to your query I would say pageblocktable isn't particularly appropriate for this type of customization - Pageblocktable is used to ideally show data from a single object and not to show nested child records.
The viable option would be to use normal HTML tables couple with some java-script functionality to achieve the needful, what you may find limiting is the amount of effort you need to put in for implementing it. So the solution lies in use of javascript library classes like Active-widgets (www.activewidgets.com ) or Dojo library for implementing your requirement. You need to upload these js files as static resources (preferable) or documents and then include them in the pages where you want to use these functions.
coolKarnicoolKarni
Can you provide me with an example for this... because i have no idea of this.