View Full Version : [CLOSED] Set columnīs hideable property using JavaScript
Daniil
Sep 13, 2012, 9:53 PM
Hi,
Changing the hideable on the fly doesn't cause updating the menu.
I can suggest the following solution.
var grid = App.GridPanel1,
col = grid.columns[1];
col.hide();
col.hideable = false;
grid.headerCt.menu.destroy();
delete grid.headerCt.menu;
It causes the menu to be updated.
RCN
Sep 14, 2012, 12:26 PM
Thumbs up to you Danill, please mark it as closed.
Hi,
Changing the hideable on the fly doesn't cause updating the menu.
I can suggest the following solution.
var grid = App.GridPanel1,
col = grid.columns[1];
col.hide();
col.hideable = false;
grid.headerCt.menu.destroy();
delete grid.headerCt.menu;
It causes the menu to be updated.
After updating from SVN, i noticed that it's not necessary to do the following anymore:
grid.headerCt.menu.destroy();
delete grid.headerCt.menu;
So, we just have to hide the column and set hideable property to false, as shown below:
var hideNameColumn = function () {
var grid = App.GridPanel1,
col = grid.columns[1];
col.hide();
col.hideable = false;
}
Daniil
Aug 02, 2013, 5:05 AM
Good to know. Thank you for the update, Raphael.
RCN
Aug 02, 2013, 12:38 PM
You're welcome.
Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.