Looping through pxResults and set the property to table column title and Value to rows of a table
Can someone tell me how can I achieve the below?
I have a requirement to loop through the pxResults, and populate a table with the values. The property name should be the header of the columns of a table and the corresponding values as rows of the table. Also, based on the class, the properties on pxResults will differ and therefore the table structure. So the table has to be dynamically created.
Example- if I have .pxResults(1) =
|
Can someone tell me how can I achieve the below?
I have a requirement to loop through the pxResults, and populate a table with the values. The property name should be the header of the columns of a table and the corresponding values as rows of the table. Also, based on the class, the properties on pxResults will differ and therefore the table structure. So the table has to be dynamically created.
Example- if I have .pxResults(1) =
and pxResults(2) =
Then the table should be dynamically be built like
pyName | pyValue |
Bar | BAR |
Fieldset | OUTLINE |