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
Raksha NarayanRaksha Narayan 

Display field names in column instead of row using datatables in lightning Web Component in Salesforce

Is it possible to display field names in column instead of row using datatables in lightning Web Component in Salesforce as shown below?

User-added image
SubratSubrat (Salesforce Developers) 
Hello Raksha ,

This can be achieved by specifying the columns attribute in the lightning-datatable component.

For further reference , requesting you to go through this documentation once and let me know further -> https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation

If it helps please mark this as best answer.
Thank you.