Question

I know that hideHeaders: true hides the property grid's headers (names, values).

Now, if I want to make the headers visible from outside, how I can achieve that?

Example:

var grid = Ext.create('Ext.grid.property.Grid', 
{
    id: 'grid',
    hideHeaders: true   
});

// I get/create a source here
grid.setSource(data);

// now, since my grid is full, I want to show the headers
// tried this but did not work :/
grid.add({hideHeaders: false});

Thanks

Was it helpful?

Solution

I don't think that there is a way to do that built into the framework, but you could probably hack your way to the solution...

On your grid, add a listener to hide the headers:

listeners: {
    afterrender: function(grid) {
        grid.headerCt.setVisible(false);
    }
}

Then, when you're ready to show the headers again:

grid.headerCt.setVisible(true);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top