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

DV Duraimurugan Vedagiri Syncfusion Team 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.


DV Duraimurugan Vedagiri Syncfusion Team 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.
Up arrow icon