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
martin_wumartin_wu 

How to build a datatable from maps

Hi all,

 

Someone told me that it would be possible to construct a VF datatable from a number of maps, whereby the maps have the header name as the key and the cell value as the value. Is this feasible? If yes, how would it work? 

Essentially, what I am trying to do is build a datatable from two custom objects, where the number of columns is determined at runtime. If I could pass a list of maps from the controller to the datatable that would help quite a bit. 

 

Kind regards,

Martin