GcNumberCell型セルに設定した最大値・最小値の範囲外の値が入力された場合、入力値をクリアしたい
対象製品
MultiRow for Windows Forms 10.0J
詳細
GcNumberCell型セルのMaxMinBehavior プロパティをClearに設定することで最大値・最小値の範囲外の入力値をクリアすることが可能です。
[Visual Basic]
[C#]
[Visual Basic]
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' セル型の作成 Dim numberCell As New GrapeCity.Win.MultiRow.InputMan.GcNumberCell() numberCell.Name = "numberCell" numberCell.MinValue = 0 numberCell.MaxValue = 10 numberCell.MaxMinBehavior = GrapeCity.Win.Editors.MaxMinBehavior.Clear Dim textCell As New GrapeCity.Win.MultiRow.TextBoxCell() textCell.Name = "textCell" ' MultiRowの設定 GcMultiRow1.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {numberCell, textCell}) GcMultiRow1.RowCount = 5 GcMultiRow1.SetValue(0, 0, 10) End Sub
[C#]
private void Form1_Load(object sender, EventArgs e) { // セル型の作成 GrapeCity.Win.MultiRow.InputMan.GcNumberCell numberCell = new GrapeCity.Win.MultiRow.InputMan.GcNumberCell(); numberCell.Name = "numberCell"; numberCell.MinValue = 0; numberCell.MaxValue = 10; numberCell.MaxMinBehavior = GrapeCity.Win.Editors.MaxMinBehavior.Clear; GrapeCity.Win.MultiRow.TextBoxCell textCell = new GrapeCity.Win.MultiRow.TextBoxCell(); textCell.Name = "textCell"; // MultiRowの設定 gcMultiRow1.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] { numberCell, textCell }); gcMultiRow1.RowCount = 5; gcMultiRow1.SetValue(0, 0, 10); }