Using JSL, you can prevent any changes to the data table (such as changing column names, changing the data type, deleting rows, and so on), using Lock Data(1).
dt << Lock Data Table( 1 );
To prevent modifying adding or deleting columns and rows and modifying cells, use Set Edit Lock:
dt << Set Edit Lock( "Add Columns" );
dt << Set Edit Lock( "Delete Columns" );
dt << Set Edit Lock( "Add Rows" );
dt << Set Edit Lock( "Delete Rows" );
dt << Set Edit Lock( "Modify Cells" );
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" );