How to configure GridEditorComboBox in SetupEditor

Posted by: tom.galczynski on 3 June 2025, 10:48 am EST

  • Posted 3 June 2025, 10:48 am EST

    Hello support! We noticed in C1FlexGrid when we set a cell range Datamap, the default editor in SetupEditor event is a GridEditorComboBox. However if we try to directcast the editor we get the error “BC30389: ‘C1.Win.C1FlexGrid.GridEditorComboBox’ is not accessible in this context because it is ‘Friend’.” (Using Visual Basic.) It seems the combobox no longer supports matches on multiple entries by default as it used to. If user type “MA”, the combobox will select the “A” entry instead of first “MA” match and we are trying to correct that. We are using C1.Win.C1FlexGrid version 4.8.20241.664.

    How can we modify the editor in this case? Thanks for your help.

  • Posted 4 June 2025, 7:09 am EST

    Hi Tom,

    Thank you for sharing the details.

    Just for your information, this is the default behavior of the GridEditorComboBox (inherited from WinForms ComboBox). It suggests entries starting with the typed letter, and does not maintain a buffer if keys are pressed in quick succession.

    As a workaround, you can handle the SetupEditor event and cast the C1FlexGrid.Editor to a ComboBox object. Then, you can attach a KeyPress event handler to implement a custom selection logic.

    We’ve attached a sample project demonstrating a basic implementation of this approach. In the sample project, typing “MA” quickly (within 500 milliseconds) selects the “MAM” item instead of the “ABC” item. You can further enhance this logic as per your needs.

    Attachment: FlexGridComboBoxSuggestions.zip

    Best Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels