Hi,
I am trying to export my data from XamDataGrid to Excel using DataPresenterExcelExporter. I know that I can manually set colors and styles on CellExporting, but what I wanted to achieve is toautomaticallyexport also the grid's colors and format (as I have some sort of conditional formatting implemented in the grid).
Is there a possible way of doing this in infragistics?
Thanks!
Hello,The formatting of the grid when exported to Excel could be specified in the XAML. It could be set to specific field using the ExcelCellFormatSettings:
<igDP:Field Name="OrderID"> <igDP:Field.Settings> <igDP:FieldSettings> <igExcelExporter:DataPresenterExcelExporter.ExcelCellFormatSettings> <igExcelExporter:FormatSettings BorderColor="#FF999999" FontColor="Gray" FontWeight="Bold" FontFamily="Arial" FillPattern="Solid" FillPatternBackgroundColor="#FFDBEEF3" FillPatternForegroundColor="#FFDBEEF3" HorizontalAlignment="Right"> <igExcelExporter:FormatSettings.FontSize> <igWindows:DeviceUnitLength Value="12" UnitType="Point" /> </igExcelExporter:FormatSettings.FontSize> </igExcelExporter:FormatSettings> </igExcelExporter:DataPresenterExcelExporter.ExcelCellFormatSettings></igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field>