Read-only Grid

If you don't want to give your user edit-permissions, set most allow-options to false. You'll end up with a high-performance read-only data table, where values can only be selected and copied, but not edited.

Keep in mind that this disables user-based actions, such as dragging and keyboard controls. Any action that is disallowed will also exclude the belonging item from the Context Menu.

You can however still trigger DataGridXL methods, like grid.copy(). These are not prevented, even if the corresponding allow-option is set to false.

Code

<style>
#grid {
  height: 400px;
}
</style>

<div id="grid"></div>

<script src="https://code.datagridxl.com/datagridxl2.js"></script>
<script>
var grid = new DataGridXL("grid", {
  data: DataGridXL.createDummyData(5000,10),
  // disallow drag actions
  allowInsertRows: false,
  allowDeleteRows: false,
  allowMoveRows: false,
  allowInsertCols: false,
  allowDeleteCols: false,
  allowMoveCols: false,
  allowFillCells: false,
  allowEditCells: false,
  // disallow clipboard
  allowCut: false,
  allowPaste: false,
  // still allow copy & col resize (default)
  allowResizeCols: true,
  allowCopy: true
});
</script>

Leave email to receive latest updates!