This is a migrated thread and some comments may be shown as answers.

Make column in grid not reorderable

0 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 24 Jan 2012, 02:58 PM
I'm looking to lock a column in place, make it not able to be reordered.

For Example: The first column of the grid should always remain the first column, regardless of the other columns moving around. You can't move the first column (and since it's the first you can't move another column before it). Same can go for the last column.

There doesn't seem to be a way to set this up when defining the grid in the view.

Is there currently a supported solution for this? 

Current Workaround:
Looking through the reordering javascript code it seems that draggable and droppable objects have selectors defined which select all header cells excluding grouping and hierarchical cells. I've tried locking down columns by applying these classes, but that expectantly causes unwanted behavior with the columns.

Adding another class here (and applying that class to the locked columns), or excluding the first ( or any number of columns at the ends of the grid ) makes locking the columns possible. 
Tags
Grid
Asked by
David
Top achievements
Rank 1
Share this question
or