I need a option to hide the header from a dojox.grid.DataGrid grid. Didn't find anything. I'm grateful for any info!
Asked
Active
Viewed 5,598 times
4 Answers
4
I use in dojo 1.6 (and probably works since dojo 1.3)
#myGrid .dojoxGridHeader { display:none; }

jleviaguirre
- 686
- 6
- 10
-
thank you, this should be mentioned in the dojo documentation :-) – Micha Roon Mar 16 '12 at 09:20
1
You can use CSS:
.dojoxGrid-header { display:none; }
This solution is taken from: http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html#hiding-the-headers-of-a-grid

Rolf
- 11
- 1
0
u can connect at the postrender of the data grid. then find the headerGrid element created then put style display to none.
//workaround the grid calls postrender after
//the component is at the dom.
//so then i can change the style to reset the header to invisible
dojo.connect(grid,"postrender",function(){
var headerGrid =this.domNode.firstElementChild;
headerGrid.style.display="none";
});

cabaji99
- 1,305
- 11
- 9
0
I would recommend switching to using the new and improved dgrid instead of datagrid, it is a lot better!
The setting for hiding headers is the attribute 'showHeader' which is a boolean value.
Check out this dgrid tutorial that talks you through defining grid structures including 'showHeader'.

Jeremy
- 3,418
- 2
- 32
- 42