数値型セルに範囲外の数値を入力するとエラーが発生する場合がある
対象製品
El Tabelle for .NET 2.0J
発生環境
・この現象は次のファイル バージョンのアセンブリで発生します。
v2.0.2004.1130 (HotFix)
v2.0.2005.0127
v2.0.2005.0304
v2.0.2004.1130 (HotFix)
v2.0.2005.0127
v2.0.2005.0304
状況
修正済み
詳細
Sheet.CellNotify イベントの e.Name="TextChanged" で Cell.Value プロパティを取得する処理を行った時、数値型セルに MaxValue、MinValue プロパティの範囲外の数値を入力するとエラーが発生します。
[Visual Basic]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objNumberEditor As New GrapeCity.Win.ElTabelle.Editors.NumberEditor
objNumberEditor.MinValue = 0
objNumberEditor.MaxValue = 10
Me.Sheet1(0, 0).Editor = objNumberEditor
End Sub
Private Sub Sheet1_CellNotify(ByVal sender As Object, ByVal e As GrapeCity.Win.ElTabelle.CellNotifyEventArgs) Handles Sheet1.CellNotify
If (e.Name = "TextChanged") Then
Debug.WriteLine(Sheet1.ActiveCell.Value)
End If
End Sub
[C#]
private void Form1_Load(object sender, System.EventArgs e)
{
GrapeCity.Win.ElTabelle.Editors.NumberEditor objNumberEditor =
new GrapeCity.Win.ElTabelle.Editors.NumberEditor();
objNumberEditor.MinValue = 0;
objNumberEditor.MaxValue = 10;
this.sheet1[0, 0].Editor = objNumberEditor;
}
private void sheet1_CellNotify(object sender, GrapeCity.Win.ElTabelle.CellNotifyEventArgs e)
{
if (e.Name == "TextChanged")
{
System.Diagnostics.Debug.WriteLine(this.sheet1.ActiveCell.Value);
}
}
※0以下または10以上の値を入力すると、「'System.StackOverflowException' のハンドルされていない例外が system.windows.forms.dll で発生しました。」が表示されます。
[Visual Basic]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objNumberEditor As New GrapeCity.Win.ElTabelle.Editors.NumberEditor
objNumberEditor.MinValue = 0
objNumberEditor.MaxValue = 10
Me.Sheet1(0, 0).Editor = objNumberEditor
End Sub
Private Sub Sheet1_CellNotify(ByVal sender As Object, ByVal e As GrapeCity.Win.ElTabelle.CellNotifyEventArgs) Handles Sheet1.CellNotify
If (e.Name = "TextChanged") Then
Debug.WriteLine(Sheet1.ActiveCell.Value)
End If
End Sub
[C#]
private void Form1_Load(object sender, System.EventArgs e)
{
GrapeCity.Win.ElTabelle.Editors.NumberEditor objNumberEditor =
new GrapeCity.Win.ElTabelle.Editors.NumberEditor();
objNumberEditor.MinValue = 0;
objNumberEditor.MaxValue = 10;
this.sheet1[0, 0].Editor = objNumberEditor;
}
private void sheet1_CellNotify(object sender, GrapeCity.Win.ElTabelle.CellNotifyEventArgs e)
{
if (e.Name == "TextChanged")
{
System.Diagnostics.Debug.WriteLine(this.sheet1.ActiveCell.Value);
}
}
※0以下または10以上の値を入力すると、「'System.StackOverflowException' のハンドルされていない例外が system.windows.forms.dll で発生しました。」が表示されます。
回避方法
この現象はファイル バージョン v2.0.2005.0331 以降のアセンブリで修正されています。
修正版は こちら からダウンロードできます。
問題が修正されたアセンブリに移行する以外、この問題を回避する方法はありません。
この現象は、El Tabelle for .NET 3.0 では発生しません。
修正版は こちら からダウンロードできます。
問題が修正されたアセンブリに移行する以外、この問題を回避する方法はありません。
この現象は、El Tabelle for .NET 3.0 では発生しません。
キーワード
ELTB04612
この文書は、以前は次のバグレポートIDで公開されていました : 4813