Change row back color on CellComboBoxSelectionChanged

How would i change the row color when the event CellComboBoxSelectionChanged is fired. I want to highlight the rows that a change to the combobox data has been made.

Thanks, Martin

1 Reply 1 reply marked as answer

SS Susmitha Sundar Syncfusion Team June 24, 2020 04:10 PM UTC

Hi Martin, 
 
Thank you for using Syncfusion controls. 
 
You can achieve your requirement “Change the back color of row when changed the selected item of ComboBox column” by QueryRowStyle event. 
 
 
this.sfDataGrid1.QueryRowStyle += SfDataGrid1_QueryRowStyle; 
 
private void SfDataGrid1_QueryRowStyle(object sender, QueryRowStyleEventArgs e) 
 { 
     if (e.RowData == null) 
         return; 
     if ((e.RowData as OrderInfo).ShipCity == "Lula") 
         e.Style.BackColor = Color.LightGreen; 
 } 
 
 
 
Please check the sample and let us know if you need further assistance on this. 
 
Regards, 
Susmitha S 


Marked as answer
Loader.
Up arrow icon