Tuesday, January 12, 2016

How to export XtraGrid to excel with cell and row styles?

Scenario:

In current implementation, I have applied custom style using the GridView_RowCellStyle event e.g. text formatting and background color. Then I was trying to export the grid to excel file but all of the applied styles lost.

Solution:

To solve this problem which was looking huge by doing a small correction in implementation in never version of DevExpress controls. I set the DevExpress.Export.ExportSettings.DefaultExportType property to WYSIWYG and tried to export it again. Now I found all the changes as I have applied through customization.

No comments :

Post a Comment