作成日: 2015/07/01 最終更新日: 2015/09/16
文書種別
不具合
状況
修正済み
詳細
ColumnValueConverterを使用してデータマップされた列において日本語を入力すると例外が発生することがあります。
回避方法
この問題はバージョン4.0.20152.479で修正されました。
修正版の適用方法については、アップデートの方法を参照してください。
修正版を適用しない場合の回避方法は次の通りです
ColumnValueConverterを使用する代わりに、CellEditingTemplateを使用し、ComboBoxコントロールをエディタとして使用します。
ColumnValueConverterを使用する場合は、C1FlexEditのPrepareCellForEditイベントにてテキスト入力を不可にします。
◎サンプルコード(VB)
◎サンプルコード(C#)
修正版の適用方法については、アップデートの方法を参照してください。
修正版を適用しない場合の回避方法は次の通りです
ColumnValueConverterを使用する代わりに、CellEditingTemplateを使用し、ComboBoxコントロールをエディタとして使用します。
ColumnValueConverterを使用する場合は、C1FlexEditのPrepareCellForEditイベントにてテキスト入力を不可にします。
◎サンプルコード(VB)
Private Sub C1FlexGrid1_PrepareCellForEdit(sender As Object, e As C1.Win.C1FlexGrid.CellEditEventArgs)
Dim border As Border = DirectCast(e.Editor, Border)
If Not IsNothing(Border) Then
Dim combo As C1FlexComboBox = DirectCast(border.Child, C1FlexComboBox)
If Not IsNothing(combo) Then
combo.IsReadOnly = True
End If
End If
End Sub
Dim border As Border = DirectCast(e.Editor, Border)
If Not IsNothing(Border) Then
Dim combo As C1FlexComboBox = DirectCast(border.Child, C1FlexComboBox)
If Not IsNothing(combo) Then
combo.IsReadOnly = True
End If
End If
End Sub
◎サンプルコード(C#)
private void c1FlexEdit_PrepareCellForEdit(object sender, CellEditEventArgs e)
{
Border border = e.Editor as Border;
if(border != null)
{
C1FlexComboBox combo = border.Child as C1FlexComboBox;
if (combo != null)
combo.IsReadOnly = true;
}
}
{
Border border = e.Editor as Border;
if(border != null)
{
C1FlexComboBox combo = border.Child as C1FlexComboBox;
if (combo != null)
combo.IsReadOnly = true;
}
}
旧文書番号
81388