Hiding column headings of Data Grid 2

1
I don’t wish any column headings to show when using Data Grid 2. Is this possible? Presently, a large gap is left where the headings would have been. I am using Data Grid 2 because no other data grids work within an accordion widget. Thank you.
asked
3 answers
1

Hi James, do you mean you wish to have no headers at all on the datagrid. Only the data?

 

If so you could try apply a CSS Class hide-d2-headers and add this to your styling sheet

 

.hide-d2-headers {

  .table-content {

    .tr:first-of-type {

      display: none;

    }

  }

}

answered
0

Hi James,

I guess you need some custom styling to hide the column headings. e.g. you can add a custom class to the data grid 2 and add something like .yourCustomClass .column-header { display: none }, if you only want to hide the column headers or something like .yourCustomClass .table-content .tr:first-of-typefor the complete header.

Hope this helps!

answered
0

Resurrecting an old thread a bit but with the later versions of Datagrid 2 this can now be done on a per-column basis with expressions and works very well

answered