PDA

View Full Version : grid columns fixed not closable on deselect checkbox



javapurna
19 Apr 2013, 3:31 AM
hi every one ,
how to prevent closing of grid header columns on deselecting selecting check box. my requirement is in my grid some columns are not close (like first name, actions). see image on deselect my fixed columns not close / hide that columns to show for shorting /closing .


please anaswer me43243

slemmon
20 Apr 2013, 8:03 PM
You can set hideable: false on columns you don't want to be closable by the user.
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.column.Column-cfg-hideable

javapurna
6 Aug 2013, 2:00 AM
var Grid = Ext.create('Ext.grid.Panel', {
title:grid_title,
enableColLock: false,
itemId:'ReportGrid',
enableCtxMenu: false,
enableColumnHide:false,
enableColumnMove: false,
enableDragDrop: false,
enableHdMenu: true,
features: [groupingFeature],
store:this.getStore(),
columns: [{
text: displayname,
dataIndex: 'DisplayName',
flex:1,
sortable: false,
itemId :'Name'
}, {
text: 'featureUuid',
dataIndex: 'featureUUID',
sortable: false,
hidden:true
},{
text: 'reportUuid',
dataIndex: 'UUID',
sortable: false,
hidden:true
},{
text: 'reportName',
dataIndex: 'tName',
sortable: false,
hidden:true

}],
features: [{
ftype: 'grouping'
}],


});


if sortable:false to all columns context menu not displayed.

refer :http://www.sencha.com/forum/showthread.php?2833-Disabling-header-context-menu-in-grid

slemmon
6 Aug 2013, 9:13 AM
With you test case you have enableColumnHide: false and sortable: false - those are the two things that the column header menu would have allowed you to manage. Since both are false the menu is not shown.