ComboItem.Selected プロパティが常に false を返す
対象製品
El Tabelle for .NET 2.0J
発生環境
・この現象は次のファイル バージョンのアセンブリで発生します。
v2.0.2004.0304
v2.0.2004.0324 (HotFix)
v2.0.2004.0521
v2.0.2004.0629 (HotFix)
v2.0.2004.0831 (HotFix)
v2.0.2004.1028
v2.0.2004.1130 (HotFix)
v2.0.2005.0127
v2.0.2005.0304
v2.0.2004.0304
v2.0.2004.0324 (HotFix)
v2.0.2004.0521
v2.0.2004.0629 (HotFix)
v2.0.2004.0831 (HotFix)
v2.0.2004.1028
v2.0.2004.1130 (HotFix)
v2.0.2005.0127
v2.0.2005.0304
状況
修正済み
詳細
拡張コンボボックス型セルにアイテムを追加、選択した時、Sheet.CellNotify イベントの e.Name="SelectedIndexChanged" で ComboItem.Selected プロパティが常に false を返します。
[Visual Basic]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objSuperiorComboEditor As New GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor
objSuperiorComboEditor.Items.Add("aaa")
objSuperiorComboEditor.Items.Add("bbb")
objSuperiorComboEditor.Items.Add("ccc")
Sheet1(0, 0).Editor = objSuperiorComboEditor
End Sub
Private Sub Sheet1_CellNotify(ByVal sender As Object, ByVal e As GrapeCity.Win.ElTabelle.CellNotifyEventArgs) Handles Sheet1.CellNotify
If e.Name = "SelectedIndexChanged" Then
Dim objSpComboEditor As GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor
objSpComboEditor = CType(Sheet1.ActiveCell.Editor, GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor)
Debug.WriteLine("0:" & objSpComboEditor.Items(0).Selected)
Debug.WriteLine("1:" & objSpComboEditor.Items(1).Selected)
Debug.WriteLine("2:" & objSpComboEditor.Items(2).Selected)
End If
End Sub
[C#]
private void Form1_Load(object sender, System.EventArgs e)
{
GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor objSuperiorComboEditor =
new GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor();
objSuperiorComboEditor.Items.Add("aaa");
objSuperiorComboEditor.Items.Add("bbb");
objSuperiorComboEditor.Items.Add("ccc");
this.sheet1[0, 0].Editor = objSuperiorComboEditor;
}
private void sheet1_CellNotify(object sender, GrapeCity.Win.ElTabelle.CellNotifyEventArgs e)
{
if (e.Name == "SelectedIndexChanged")
{
GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor objSpComboEditor;
objSpComboEditor = (GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor)sheet1.ActiveCell.Editor;
System.Diagnostics.Debug.WriteLine("0:" + objSpComboEditor.Items[0].Selected.ToString());
System.Diagnostics.Debug.WriteLine("1:" + objSpComboEditor.Items[1].Selected.ToString());
System.Diagnostics.Debug.WriteLine("2:" + objSpComboEditor.Items[2].Selected.ToString());
}
}
[Visual Basic]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objSuperiorComboEditor As New GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor
objSuperiorComboEditor.Items.Add("aaa")
objSuperiorComboEditor.Items.Add("bbb")
objSuperiorComboEditor.Items.Add("ccc")
Sheet1(0, 0).Editor = objSuperiorComboEditor
End Sub
Private Sub Sheet1_CellNotify(ByVal sender As Object, ByVal e As GrapeCity.Win.ElTabelle.CellNotifyEventArgs) Handles Sheet1.CellNotify
If e.Name = "SelectedIndexChanged" Then
Dim objSpComboEditor As GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor
objSpComboEditor = CType(Sheet1.ActiveCell.Editor, GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor)
Debug.WriteLine("0:" & objSpComboEditor.Items(0).Selected)
Debug.WriteLine("1:" & objSpComboEditor.Items(1).Selected)
Debug.WriteLine("2:" & objSpComboEditor.Items(2).Selected)
End If
End Sub
[C#]
private void Form1_Load(object sender, System.EventArgs e)
{
GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor objSuperiorComboEditor =
new GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor();
objSuperiorComboEditor.Items.Add("aaa");
objSuperiorComboEditor.Items.Add("bbb");
objSuperiorComboEditor.Items.Add("ccc");
this.sheet1[0, 0].Editor = objSuperiorComboEditor;
}
private void sheet1_CellNotify(object sender, GrapeCity.Win.ElTabelle.CellNotifyEventArgs e)
{
if (e.Name == "SelectedIndexChanged")
{
GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor objSpComboEditor;
objSpComboEditor = (GrapeCity.Win.ElTabelle.Editors.SuperiorComboEditor)sheet1.ActiveCell.Editor;
System.Diagnostics.Debug.WriteLine("0:" + objSpComboEditor.Items[0].Selected.ToString());
System.Diagnostics.Debug.WriteLine("1:" + objSpComboEditor.Items[1].Selected.ToString());
System.Diagnostics.Debug.WriteLine("2:" + objSpComboEditor.Items[2].Selected.ToString());
}
}
回避方法
この現象はファイル バージョン v2.0.2005.0331 以降のアセンブリで修正されています。
修正版は こちら からダウンロードできます。
問題が修正されたアセンブリに移行する以外、この問題を回避する方法はありません。
この現象は、El Tabelle for .NET 3.0 では発生しません。
修正版は こちら からダウンロードできます。
問題が修正されたアセンブリに移行する以外、この問題を回避する方法はありません。
この現象は、El Tabelle for .NET 3.0 では発生しません。
キーワード
ELTB04472
この文書は、以前は次のバグレポートIDで公開されていました : 4815