you mean Pin column?
Please use this contextMenu definition.
contextMenu: {
on: true,
cellItems(evt, ui) {
let col = ui.column;
if (col.originalColIndx) {
return [
{
name: 'Un Pin Column',
action(evt, ui) {
let col = ui.column, ci = ui.colIndx,
fc = (this.option('freezeCols') || 0) * 1;
this.Columns().move(1, ci, col.originalColIndx + 1);
delete col.originalColIndx;
this.option('freezeCols', fc - 1);
this.refresh();
}
}
];
}
else {
return [
{
name: 'Pin Column',
action(evt, ui) {
let col = ui.column, ci = ui.colIndx,
fc = (this.option('freezeCols') || 0) * 1;
col.originalColIndx = ci;
this.Columns().move(1, ci, fc);
this.option('freezeCols', 1 + fc);
this.refresh();
}
}
];
}
}
},