RealGrid2 Guide
Editor
Input limit editor

Limit input characters

With the editor's ignoreCharacters and inputCharacters properties, you can set only specific characters to be input, or restrict certain characters from being input.

Only specific characters can be entered

Characters applied to the editor.inputCharacters property can be input when editing grid cells.

{
     "name": "OrderID",
     "fieldName": "OrderID",
     "width": "150",
     "header": {
         "text": "Only alphabet input is allowed"
     },
     "editor": {
         "type": "line",
         "inputCharacters": "A-Za-z"
     }
}

Restrict input of specific characters

Characters applied to the editor.ignoreCharacters property cannot be entered when editing grid cells.

{
     "name": "CustomerID",
     "fieldName": "CustomerID",
     "width": "150",
     "header": {
         "text": "Alphabet cannot be entered"
     },
     "editor": {
         "type": "line",
         "ignoreCharacters": "A-Za-z"
     }
}

Only Korean characters can be entered

You can use inputCharacters to set it so that only Korean characters can be input.

{
     "name": "EmployeeID",
     "fieldName": "EmployeeID",
     "width": "150",
     "header": {
         "text": "Only Korean characters can be entered"
     },
     "editor": {
         "type": "line",
         "inputCharacters": "ㄱ-힣"
     }
}