Andree_H
Andree_H

Reputation: 51

dojox.grid.DataGrid hide/disable the header of the grid

I need a option to hide the header from a dojox.grid.DataGrid grid. Didn't find anything. I'm grateful for any info!

Upvotes: 1

Views: 5644

Answers (4)

Jeremy
Jeremy

Reputation: 3528

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'.

Upvotes: 0

cabaji99
cabaji99

Reputation: 1445

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";
                            });

Upvotes: 0

jleviaguirre
jleviaguirre

Reputation: 706

I use in dojo 1.6 (and probably works since dojo 1.3)

#myGrid .dojoxGridHeader  { display:none; }

Upvotes: 4

Rolf
Rolf

Reputation: 11

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

Upvotes: 1

Related Questions