2

I have one simple grid panel in ExtJs 5

Ext.create('Ext.grid.Panel', {
        height: 700,
        frame: true,
        title: '', 
        ....
});

I want to delete the title of grid (or it is title of panel), but I don't know how. i set title:'', title:false, deleted it, but the empty div is still there (before column names) How to remove title of grid panel?

PS:

 hideHeaders: true //it remove all columns names (header of table)
Marin Vartan
  • 572
  • 7
  • 16
  • Possible duplicate of [Hide ExtJS Panel Title](http://stackoverflow.com/questions/3004444/hide-extjs-panel-title) – Vadzim Feb 10 '17 at 19:25

2 Answers2

3

From the docs:

title : String

The title text to be used to display in the Panel Header. Or a config object for a Panel Title. When a title is specified the Ext.panel.Header will automatically be created and displayed unless header is set to false.

So the solution will be to set header to false in the configuration:

Ext.create('Ext.grid.Panel', {
    height: 700,
    frame: true,
    header: false,
    // ...
});
VisioN
  • 143,310
  • 32
  • 282
  • 281
  • Setting header to false appears to no longer be an option in ExtJs 6.0.X Anyone know how to make the title not display in ExtJs 6.0.X? – StvnBrkdll Mar 29 '16 at 20:37
  • @mangotang Try to use `titleBar: { hidden: true },` in grid definition. In ExtJS 6.2 Modern works fine. – rafalli May 24 '17 at 07:45
0

For the latest versions use config property preventHeader: true/false true - Title header will not be shown false - Title header will be rendered

rustygb
  • 306
  • 1
  • 5
  • 13