Skip to main content

Grid data field size

  • January 12, 2012
  • 2 replies
  • 0 views

[Migrated content. Thread originally posted on 11 January 2012]

I am using a grid with a grid data field declared as pic x(80). I set the column width to accomodate typing up to 80 upper case letters. If the operator uses lower case or numbers, more than 80 can be typed but of course only 80 are captured in the grid data field. Is there anything like max-text that can be used to stop the operator from typing after 80 charaters are reached regardless of font or character size?

2 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • January 12, 2012

[Migrated content. Thread originally posted on 11 January 2012]

I am using a grid with a grid data field declared as pic x(80). I set the column width to accomodate typing up to 80 upper case letters. If the operator uses lower case or numbers, more than 80 can be typed but of course only 80 are captured in the grid data field. Is there anything like max-text that can be used to stop the operator from typing after 80 charaters are reached regardless of font or character size?
I believe so, the Column property DATA-TYPES

DATA-TYPES (alphanumeric)

Describes various entry characteristics of each column. Each time you set this property, you describe the data type for the next column in the grid, starting with the first. Setting this property to spaces clears the previously specified data types.

A data type specification contains two components. The first is a single character that describes the set of legal characters that the user may type in this column. The set of possible values is:

Character Description Characters Allowed "X" Alphanumeric All characters "U" Uppercase alphanumeric
All characters - automatically converted to uppercase "L" Lowercase alphanumeric
All characters - automatically converted to lowercase "9" Number
Digits, local decimal point, sign, space "Z" Edited number
Digits, sign, period, comma, local currency symbol, "$", "*", "/", "%", space
"I" Integer Digits, sign, space "P" Positive integer Digits, space "D" Date Digits, "/", hyphen
"E" European Date Digits, "/", hyphen, period

You may specify the data type character in either upper or lower case. After the data type character, you may specify the maximum number of characters that may be entered in this column. This value is specified in parentheses. Two values have special meanings: "0" indicates that the maximum characters is set equal to the size of the column, and "-1" indicates no limit other than those imposed by the internals of the grid (i.e., 32766 characters).

  • Author
  • Rocketeer
  • 19312 replies
  • January 12, 2012

[Migrated content. Thread originally posted on 11 January 2012]

I am using a grid with a grid data field declared as pic x(80). I set the column width to accomodate typing up to 80 upper case letters. If the operator uses lower case or numbers, more than 80 can be typed but of course only 80 are captured in the grid data field. Is there anything like max-text that can be used to stop the operator from typing after 80 charaters are reached regardless of font or character size?
Thanks, I read the documentation on that but it went right by me. I'm so glad to have the forum back!