We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to change WinForms MultiColumnComboBox row colors?

Hi,
Is it possible to change color in MultiColumnComboBox rows or cells? Like row or cell backcolor, text color, header backcolor or text color?
I can't find any threads about this...
Thanks

3 Replies

Duraimurugan Vedagiri March 19, 2020 12:35 PM UTC

Hi Dinis,

Thanks for using syncfusion products.

We have analyzed your reported requirement "Is it possible to change the row color in MultiColumnComboBox?" and you can achieve by using PrepareViewStyleInfo event.

Please refer the below code snippet and screenshot for your reference.

 
GridControl grid = this.multiColumnComboBox1.ListBox.Grid; 
grid.PrepareViewStyleInfo += Gc_PrepareViewStyleInfo; 
  
private void Gc_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) 
{ 
    if (e.RowIndex == 0) 
    { 
        e.Style.BackColor = Color.Black; 
        e.Style.TextColor = Color.White; 
    } 
} 
  
Screen Shot

 
  
Regards,
Durai 





DF Dinis Ferreira March 20, 2020 11:43 AM UTC

Hello,
It works very good.
Thank you.

Duraimurugan Vedagiri March 24, 2020 04:24 AM UTC

Hi Dinis,

Thanks for you update.

We are glad to know that you are achieve your requirement at your end. Please let us know if you need any further assistance.

Regards,
Durai
Loader.
Live Chat Icon For mobile
Up arrow icon