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
visualforce_devvisualforce_dev 

Expansion of table row and coloring

 How can I expand a table row like this.
 

+  2233   XXX  XXX            XXXX       ..      XX-XX-XXXX  Partially Done
 
 click on + sign gives
 

-  2233   XXX   XXX   XXX   XXXX    XYZ    XX-XX-XXXX   SUBMITTED

                                                         ABC                           APPROVED

                                                         DEF                          SUBMITTED

 

Also based on the value how can I set color for each row?

 

Ron HessRon Hess
this is a bit tricky, but could be made into a nice component.
you layout the entire table as it will be in it's fully expanded mode, then you control the display.style=none on the rows and cols that you want to hide at any one time.

there is a cool tree widget in the YUI library, i've seen this used in a visualforce page and it looks nice. I don't have a sample for that but will look around.
visualforce_devvisualforce_dev

Thanks Ron.

but how can I predict which all rows have children?

I m using datatable/pageblocktable for this

Ron HessRon Hess
I think you must traverse all nodes to determine which have children, so you can construct them before the page is sent to the browser
visualforce_devvisualforce_dev
Thanks..
ARUNBLIKESCLOUDARUNBLIKESCLOUD

Hello Ron,

By anychance do you have a sample VF with YUI tree widget code? If so could you please share with us ?