Lock Columns in List/Library control dynamically

Hello.

Thanks for releasing the Lock Columns feature of the list/library control in version 1.87 release as it's quite handy.

Is there a way to dynamically (via Javascript) to lock/unlock a set of column(s) of the list/library control?

Thanks,
stormanh

Hello @stormanh,

Yes, sure! You can do that programmatically using the code:

fd.control('SPDataTable1').widget.lockColumn('ColumnInternalName');
fd.control('SPDataTable1').widget.unlockColumn('ColumnInternalName');
1 Like