I know this is old but stumbled across it and thought I'd share. This isn't provided out of the box but here's a simple solution:
In the columns definition add a
reorderable: false property, and optionally a
stickyPosition property (see onReorder).
columns: [
{ field:
"check_row"
, title:
" "
, template:
"<input class='check-row' type='checkbox' />"
, reorderable:
false
, stickyPosition: 0 },
"ProductName"
,
...
]
Set a callback for the
columnReorder event.
$(
"#grid"
).kendoGrid({ columnReorder: onReorder, ... });
This onReorder callback function below will place the column back to the
stickyPosition column index, or 0 if not provided.
function
onReorder(e) {
if
(
typeof
e.column.reorderable !=
"undefined"
&& !e.column.reorderable) {
var
grid = $(
'#grid'
).data(
'kendoGrid'
);
setTimeout(
function
() {
grid.reorderColumn(e.column.stickyPosition || 0, grid.columns[e.newIndex]);
}, 0);
}
}