作成日: 2018/06/20 最終更新日: 2018/06/20
文書種別
制限事項
詳細
グリッド(GcSpreadGrid)内のアクティブセルがコンボボックス型セル(ComboBoxCellType)の場合、Tabキーを1回押すと、2つぶんカーソルが移動します。
本事象は、以下の条件で発生します。
本事象は、以下の条件で発生します。
- グリッド(GcSpreadGrid)のKeyboardNavigation.TabNavigationプロパティを"None"に設定している
- コンボボックス型セルがアクティブになっている
回避方法
カスタマイズしたコンボボックス型セルを使用します。
◎サンプルコード(C#)
◎サンプルコード(xaml)
◎サンプルコード(C#)
public class MyComboCellType : GrapeCity.Windows.SpreadGrid.ComboBoxCellType
{
protected override FrameworkElement GenerateEditElement()
{
var editor = new MyComboEditor();
var cellTypeProperty = editor.GetType().GetProperty("CellType", System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
if (cellTypeProperty != null)
{
cellTypeProperty.SetValue(editor, this);
}
return editor;
}
}
public class MyComboEditor : GrapeCity.Windows.SpreadGrid.Editors.ComboBoxEditElement
{
public MyComboEditor()
{
AddHandler(PreviewKeyDownEvent, new KeyEventHandler(EditorPreviewKeyDown), true);
}
private void EditorPreviewKeyDown(object sender, KeyEventArgs e)
{
e.Handled = true;
}
}
◎サンプルコード(xaml)
<sp:GcSpreadGrid.Columns> <sp:Column> <sp:Column.CellType> <local:MyComboCellType ContentPath="Name" SelectedValuePath="ID"/> </sp:Column.CellType> </sp:Column> </sp:GcSpreadGrid.Columns>
旧文書番号
82930