dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Set Edit Lock( "Modify Cells" );
dt << Set Edit Lock( "Add Columns", "Delete Dolumns");
dt << Set Edit Lock( "Add Rows", "Delete Rows");
To get a list of data table operations that are locked, use Get Edit Lock:
dt << Get Edit Lock();
{"Modify Cells", "Add Rows", "Delete Rows", "Add Columns", "Delete Columns"}
To allow a specific data table operation again, use Clear Edit Lock:
dt << Clear Edit Lock( "Modify Cells" );
You can lock all three data table components (cells, columns, and rows) at once by using Lock Data Table.
dt << Lock Data Table( 1 );