PDA

View Full Version : Is it possible to freeze side columns in grids?



maya
26 Apr 2007, 12:45 PM
Hi,

I perused the grid samples / documentation but was not able to find a method for freezing the first left columns (similar to the method in which the first row in the table is frozen).
It it possible to do this (e.g. like in MS Excel) using drag and drop?

Thanks in advance,

Maya

MushMorton
6 Jul 2007, 11:44 AM
You can lock a column by passing locked:true for the left-most header in the grid's column model:


var colModel = new Ext.grid.ColumnModel([
{header: "Time", width: 50, align: "right", sortable: false, locked: true, dataIndex: 'time'},
{header: "CT-1", dataIndex: 'c1'},
{header: "CT-2", dataIndex: 'c2'},
{header: "US-1", dataIndex: 'c3'},
{header: "US-2", dataIndex: 'c4'},
{header: "CR-1", dataIndex: 'c5'},
{header: "CR-2", dataIndex: 'c6'}
]);

Hope this helps.

maya
7 Jul 2007, 12:19 AM
Thanks.

phpbasic.com
11 Nov 2008, 8:57 PM
I try to use