RibbonComboBox in new ribbon: support for IFormatProvider

Posted by: wknauf on 22 September 2021, 10:21 pm EST

  • Posted 22 September 2021, 10:21 pm EST

    Hi C1,

    it seems the RibbonComboBox in the new “C1.Ribbon” namespace does not support “IFormatProvider”, as the System.Windows.Forms.ComboBox properties “FormattingEnabled”, “FormatString” and “FormatInfo” do.

    I noticed this when I tried to migrate a combobox on a RibbonControlHost to a RibbonComboBox.

    Would be nice if this could be added. For now, I will stay with a RibbonControlHost.

    Best regards

    Wolfgang

  • Posted 22 September 2021, 10:45 pm EST

    Hi,

    We have posted an enhancement request on your behalf to the development team and will let you know when we have an update.

    [Internal Tracking ID : C1WIN-25688]

    Regards

    Avnish

  • Posted 19 December 2022, 5:40 pm EST

    Hi Wolfgang,

    The development team has asked if you could provide more information on this.

    The RibbonComboBox doesn’t support data binding,

    MS Combobox uses formatting to display data (int, DateTime, etc.) of items, how do you want to use the formatting for the RibbonCombobox?

    Regards

  • Posted 20 December 2022, 11:53 pm EST

    Hi,

    attached is a sample which shows the expected behavior for a WinForms ComboBox: the combobox data is a custom class, and I want to control the displayed text (instead of using “ToString” of the custom class). So I use an “IFormatProvider” implementation.

    ComboBoxFormatProvider.zip

    Would be nice if the RibbonComboBox supported a similar approach.

    But this would probably mean major changes, as the “RibbonButton” constructor only accepts text and no data of type “object”.

    Best regards

    Wolfgang

  • Posted 21 December 2022, 6:29 pm EST

    Hi,

    Thank you for the sample and information, we have forwarded it to the development team and will let you know as soon as we have any update.

    Regards

    Avnish

Need extra support?

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

Learn More

Forum Channels