A lightning-datatable has columns that can have varying data types so a column can represent a record field and a row an individual record. I have a need for the opposite: a column per record and a row per record field of varying type. I also need the cells to be editable, though minimal other features.

Before I create my own component, is such a component available anywhere (implemented in LWC)? Or other ideas?

Interesting that this is possible just using CSS where you have full control of the CSS.

  • Would it be possible to show in a diagram format what do you want the lightning table to look like. Is it the same way as showed in the codepen example? Commented May 11 at 7:16
  • Hi @NagendraSingh, Field labels in the first column, then each column after showing the corresponding fields from the records.
    – Keith C
    Commented May 11 at 8:05

1 Answer 1


After a few hours I've a proof of concept LWC coded from scratch but using the Data Tables SLDS classes so the output looks reasonable inclduing for cell editing. I only need to support four types of fields so four permutations of lightning-input and lightning-formatted-* to handle those and don't need much beyond that.

But would still prefer a ready made solution if one exists.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .