PDA

View Full Version : ExtJs Grid Allow single column lock only



Shafaq kazmi
11 Jun 2015, 4:04 AM
Hi


I am using extjs grid (version 4.2.1). I want to only one column.


Please refer this example: http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/locking-grid.html


You can see "Company" column is locked but when user drag any other column let's say "% Change" and drop it to "Company" column. Two columns will be in lock state.

Before (1 column is locked):
52634


After (2 columns are locked after drag):
52635


Requirement:

What we want that allow user to drag/drop in lock state but when user try to drop column to source location either

we reset lock state OR
mark validdrop as false
Is there any config for it or other quick solution? Please advice.

Thanks.

tristan.lee
11 Jun 2015, 10:01 AM
You can set the other columns that you don't want to be locked by setting lockable: true to prevent it.

http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column-cfg-lockable