Check documentation for the latest version of dhtmlxSuite Cells Locking and Validation DHTMLX Docs

Cells Locking and Validation

Validation

You can control the type of data or the values that users enter into a cell by setting the appropriate validation rule.

There are 4 validation rules you can use:

  • Number - checks whether the entered value is a number.
  • Email - checks whether the entered value is an email address.
  • Positive - checks whether the entered value is a positive number.
  • Not empty - checks whether the cell contains any value.

When the entered value doesn't conform to the specified rule, the related cell is marked by the red flag: spreadsheet/unvalidated_cell.png

To set the desired validation rule, you should do the following:

  • Select a cell or cells which you wish to set a validation rule for;
  • Click the right mouse button. When the pop-up menu appears, choose Validator and then the appropriate rule.

spreadsheet/validation.png

To cancel the specified validation rule, you should do the following:

  • Select a cell or cells which you wish to cancel a validation rule for;
  • Click the right mouse button. When the pop-up menu appears, choose Validator and the rule None.

Locking/unlocking cells

You can lock/unlock cells of Spreadsheet.

Locking action can be characterized as follows:

  • It forbids any entry (values of locked cells can't be changed);
  • All cells are unlocked by default;
  • If a locked cell contains a formula that refers to unlocked cells, each time values of the referred cells are changed, the value of such a cell will be changed as well.
  • When a cell is locked it's marked by a little key in the right upper corner: spreadsheet/locked_cell.png

To lock a cell, you should do the following:

  • Select a cell or cells which you wish to lock;
  • Click the right mouse button. When the pop-up menu appears, choose Lock.

    spreadsheet/locking.png

To unlock a cell, you should do the following:

  • Select a cell or cells which you wish to unlock;
  • Click the right mouse button. When the pop-up menu appears, choose Unlock.

    spreadsheet/unlocking.png

Back to top