Column locking can be establish only when a data grid object is being created. The 4th parameter of the command dax_dataGrid allows you to set the number of leftmost column that you want to lock.
Syntax: dax_dataGrid(selection, location, headerRows, lockedLeftColumns, useControlColumn);
The rightmost columns can also locked by executing the command setRightLockedColumns.
Syntax: setRightLockedColumns(number of locked right columns);
Note:
Column locking can be done before the execution on of the command go() only.
// Lock the first column
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 1, false);
myGrid.go();
// Lock the first and second column
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 2, false);
myGrid.go();
// Lock the first through third column
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 3, false);
myGrid.go();
// Lock the last column
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 0, false);
myGrid.setRightLockedColumns(1);
myGrid.go();
// Lock the last 2 columns
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 0, false);
myGrid.setRightLockedColumns(2);
myGrid.go();
// Lock the last 3 column
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 0, false);
myGrid.setRightLockedColumns(3);
myGrid.go();
// Lock the first and last column
myGrid = new dax_dataGrid('Hospital', $('mydiv'), 1, 1, false);
myGrid.setRightLockedColumns(1);
myGrid.go();