nicora
13 Sep 2007, 3:36 PM
I've spent a good amount of time today trying to find an example of how to lock columns after the grid has rendered. I was able to unlock a column, but locking did not work. This is my grid set up:
var grid = new Ext.grid.Grid('reqGrid', {
ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
loadMask: true,
autoHeight: false,
autoWidth: false,
enableColLock:true,
enableCtxMenu: false,
enableRowHeightSync: true
});
if in the column model i set the first column locked and run this following code, it works
grid.getColumnModel().setLocked(0, 0);
but then if I fire the following code to lock it again, nothing happens
grid.getColumnModel().setLocked(0, 1);
What am I missing? Are there any examples of how to do this, I couldn't even find setLocked in the documentation, but I may have just missed it.
Thanks in advance for the help!
var grid = new Ext.grid.Grid('reqGrid', {
ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
loadMask: true,
autoHeight: false,
autoWidth: false,
enableColLock:true,
enableCtxMenu: false,
enableRowHeightSync: true
});
if in the column model i set the first column locked and run this following code, it works
grid.getColumnModel().setLocked(0, 0);
but then if I fire the following code to lock it again, nothing happens
grid.getColumnModel().setLocked(0, 1);
What am I missing? Are there any examples of how to do this, I couldn't even find setLocked in the documentation, but I may have just missed it.
Thanks in advance for the help!