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
sujin h ssujin h s 

How to display the data in table grouped by 1st column?

Hi all,

I have data returned from query. For eg:
Col 1Col 2
R1Data 1
R1Data 2
R2Data 3
R2Data 4
R1Data 5

How to display the data in table like:
Col 1Col 2
R1Data 1
Data 2
Data 5
------------------
R2Data 3
Data 4

I have to filter the rest of the column based on the data of 1st column.

Thank! in advance.
 
sachinarorasfsachinarorasf
Hi Sujin,

In order to display data in the required format, we may have multiple approaches. One of the effective ways is to filter your records and make a wrapper class at the server-side so that you can easily store the data into the required format. Then you just need to iterate that wrapper on the UI using HTML <table> tag. 

I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.

Thanks and Regards,
Sachin Arora
www.sachinsf.com