开发者

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

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


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

#myGrid .dojoxGridHeader  { display:none; }


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜