Programming Reference

Cell RESTRICTION Attribute

Cell RESTRICTION Attribute

The RESTRICTION attribute is not reliable. I have noticed inconsistent behavior with this attribute and will investigate. Until the issues are resolved, use this attribute at your own risk. If I cannot resolve the issues, this attribute may be dropped in a future release.

Every ZeeGrid cell has a RESTRICTION attribute. The cell RESTRICTION attribute is a numeric value that signifies the filtering that will be applied to a cell when it is being edited from the in-cell edit box.

By default, the restriction attribute is 0 for all cells. A RESTRICTION attribute value of zero means that there is no restriction for that cell.

Valid RESTRICTION attribute values are in the range of [0..4]

Restriction value meanings are:

  1. No Restriction
  2. Signed Integer
  3. Unsigned Integer
  4. Signed Double
  5. Unsigned Double
When numeric data is entered by the user by editing the cell contents, the RESTRICTION attribute value for the cell will determine the valid keystrokes the user may enter.

For instance, if a cell is editable and has a restriction value of 3, (Signed Double) only the digits '0'..'9', '+', '-', or '.' are accepted by the edit control. Once a decimal point ('.') is entered, a second one is not allowed.

A RESTRICTION attribute value of 1 (signed integer) would only allow the digits '0'..'9'.

For signed values, the sign must be the in the first character position of the number.

ZeeGrid messages related to the RESTRICTION attribute:

ZeeGridTMCopyright © 2002-2016 by David Hillard