作成日: 2020/06/10 最終更新日: 2021/07/28
文書種別
不具合
状況
修正済み
詳細
CalendarGridデザイナでGcCharMask型セルのCharBoxesコレクションに項目を追加できません。追加しようとすると「抽象クラスであるため、GrapeCity.Win.CalendarGrid.Editors.CharBoxのインスタンスを作成できません。」というエラーが発生します。
回避方法
この問題はService Pack 5(v2.0.4003.2012)で修正されました。
不具合を修正した最新のサービスパックは、アップデートページ からダウンロードできます。
Service Pack 5 未適用のときは以下の回避方法をご検討ください。
不具合を修正した最新のサービスパックは、アップデートページ からダウンロードできます。
Service Pack 5 未適用のときは以下の回避方法をご検討ください。
下記のように、コードでGcCharMask型セルを設定します。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
Imports GrapeCity.Win.CalendarGrid
Imports GrapeCity.Win.CalendarGrid.InputMan
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim template As CalendarTemplate = GcCalendarGrid1.Template
Dim calendarGcCharMaskCellType As CalendarGcCharMaskCellType = template.Content.GetCell(0, 0).CellType
Dim inputBox As InputBox = New InputBox()
inputBox.Size = New Size(28, 16)
calendarGcCharMaskCellType.CharBoxes.Add(inputBox)
End Sub
Imports GrapeCity.Win.CalendarGrid.InputMan
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim template As CalendarTemplate = GcCalendarGrid1.Template
Dim calendarGcCharMaskCellType As CalendarGcCharMaskCellType = template.Content.GetCell(0, 0).CellType
Dim inputBox As InputBox = New InputBox()
inputBox.Size = New Size(28, 16)
calendarGcCharMaskCellType.CharBoxes.Add(inputBox)
End Sub
◎サンプルコード(C#)
using GrapeCity.Win.CalendarGrid;
using GrapeCity.Win.CalendarGrid.InputMan;
private void Form1_Load(object sender, EventArgs e)
{
CalendarTemplate template = gcCalendarGrid1.Template;
CalendarGcCharMaskCellType calendarGcCharMaskCellType = (CalendarGcCharMaskCellType)template.Content.GetCell(0, 0).CellType;
InputBox inputBox = new InputBox();
inputBox.Size = new Size(28, 16);
calendarGcCharMaskCellType.CharBoxes.Add(inputBox);
}
using GrapeCity.Win.CalendarGrid.InputMan;
private void Form1_Load(object sender, EventArgs e)
{
CalendarTemplate template = gcCalendarGrid1.Template;
CalendarGcCharMaskCellType calendarGcCharMaskCellType = (CalendarGcCharMaskCellType)template.Content.GetCell(0, 0).CellType;
InputBox inputBox = new InputBox();
inputBox.Size = new Size(28, 16);
calendarGcCharMaskCellType.CharBoxes.Add(inputBox);
}
旧文書番号
85693