I have some cells that should display a different color font based on the value. If negative, then red. If postive, then blue.
I know I can do conditional formatting with grid_CellControlAttached & ConditionalFormattingSettings in the grid , however, since I am using the excelExporter to export to Excel, I am not sure how I use conditional formatting when exporting.
I have also looked at excelExporter_ExportStarted but there is no "Appearance" property:
e.XamGrid.Rows[i].Cells[10].Appearance.Foreground = new SolidColorBrush(Colors.Green);
and Control is null when I set it this way.
e.XamGrid.Rows[i].Cells[10].Control.Foreground
** I found a workaround by modifying the Workbook object when exporting, but it's not too elegant. If anyone has a better way, let me know.
Thanks!
If you want to change the excel style during the export you would use the cell exporting events of the exporter to change the style of the cell. The style of grid is not copied over to the Excel spreadsheet.