作成日: 2018/09/28 最終更新日: 2018/09/28
文書種別
制限事項
詳細
C1FlexGridコントロールで、ComboListを指定した列などComboBox型のエディタを使用するセルにおいて、エディタのMaxDropDownItemsプロパティを設定しても反映されません。これは、ComboBox型のエディタでは、既定で描画モードとしてOwnerDrawVariableが使用されている※ことに起因します。
※ComponentOne 2017v3(4.0.20173.286)で、他の機能改善のために内部処理的にDrawModeがOwnerDrawVariableに変更され、それ以降本現象が発生するようになりました。
MaxDropDownItemsプロパティを指定する場合は、エディタのDrawMode、DropDownHeightプロパティを、それぞれComboBoxのデフォルト値(Normalおよび106)に戻した上で、MaxDropDownItemsプロパティを設定する必要があります。ただしこの場合、ドロップダウン内の項目の高さはComboBoxの既定値に戻ることにご注意ください。
※ComponentOne 2017v3(4.0.20173.286)で、他の機能改善のために内部処理的にDrawModeがOwnerDrawVariableに変更され、それ以降本現象が発生するようになりました。
MaxDropDownItemsプロパティを指定する場合は、エディタのDrawMode、DropDownHeightプロパティを、それぞれComboBoxのデフォルト値(Normalおよび106)に戻した上で、MaxDropDownItemsプロパティを設定する必要があります。ただしこの場合、ドロップダウン内の項目の高さはComboBoxの既定値に戻ることにご注意ください。
回避方法
MaxDropDownItemsプロパティを反映させたい場合は、以下のように、一旦オーナードロー設定(DrawModeとDropDownHeight)を初期化してから、MaxDropDownItemsプロパティを指定します。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
Private Sub C1FlexGrid1_SetupEditor(sender As Object, e As RowColEventArgs) Handles C1FlexGrid1.SetupEditor
Dim editor As ComboBox = CType(C1FlexGrid1.Editor, ComboBox)
If Not editor Is Nothing Then
editor.DrawMode = DrawMode.Normal
editor.DropDownHeight = 106
editor.MaxDropDownItems = 3
End If
End Sub
Dim editor As ComboBox = CType(C1FlexGrid1.Editor, ComboBox)
If Not editor Is Nothing Then
editor.DrawMode = DrawMode.Normal
editor.DropDownHeight = 106
editor.MaxDropDownItems = 3
End If
End Sub
◎サンプルコード(C#)
private void C1FlexGrid1_SetupEditor(object sender, RowColEventArgs e)
{
ComboBox editor = ((ComboBox)(C1FlexGrid1.Editor));
if (!(editor == null))
{
editor.DrawMode = DrawMode.Normal;
editor.DropDownHeight = 106;
editor.MaxDropDownItems = 3;
}
}
{
ComboBox editor = ((ComboBox)(C1FlexGrid1.Editor));
if (!(editor == null))
{
editor.DrawMode = DrawMode.Normal;
editor.DropDownHeight = 106;
editor.MaxDropDownItems = 3;
}
}
旧文書番号
83265