MultiRow Windows Forms > Developer's Guide > Using MultiRow > User Input Validation > Built-in Cell Validators > SurrogateCharValidator |
You can use SurrogateCharValidator and validate if surrogate characters have been entered in the cell.
Complete the following steps to validate surrogate characters. The example displays a validation error if characters other than double byte katakana have been entered in textBoxCell.
The following code displays a validation error when surrogate characters are entered into the cell.
Imports GrapeCity.Win.MultiRow Dim textBoxCell1 As New TextBoxCell() Dim surrogateCharValidator1 As New SurrogateCharValidator() surrogateCharValidator1.Actions.Add(New LineNotify()) textBoxCell1.Validators.Add(surrogateCharValidator1) Dim cells As Cell() = {textBoxCell1} GcMultiRow1.Template = Template.CreateGridTemplate(cells) GcMultiRow1.RowCount = 10 |
using GrapeCity.Win.MultiRow; TextBoxCell textBoxCell1 = new TextBoxCell(); SurrogateCharValidator surrogateCharValidator1 = new SurrogateCharValidator(); surrogateCharValidator1.Actions.Add(new LineNotify()); textBoxCell1.Validators.Add(surrogateCharValidator1); Cell[] cells = { textBoxCell1 }; gcMultiRow1.Template = Template.CreateGridTemplate(cells); gcMultiRow1.RowCount = 10; |