Search code examples
dojoxpagesxpages-ssjsxpages-extlibdojox.grid.datagrid

dojo dataGrid column: how to force an empty column header?


Is there any way to force a data grid column's header label to be empty? So far I tried to leave the label property empty, enter a single space, both as fixed text and using ssjs code. But unless I assign some "real" character to the label property the header shows the column's name.

Right now I "resolved" this using css, but since there are only generic style classe for all the column headers I needed to "hack" this using

.dojoxGridMasterHeader th.dojoxGridCell[idx="0"] div.dojoxGridSortNode{display:none}...

So I need to address each column by itself just to accomplish the same thing. Not nice.

Anyone having a better idea? Lothar


Solution

  • Use a non-breaking space '\u00A0' as data grid column's header label.

        <xe:djxDataGridColumn
            id=...
            field=...
            label="#{javascript:'\u00A0'}">