I'm using a grid control from devexpress.I export the informations to excel using this code :
grdExport.ExportToXls('C:\Test.xls');
But when I export data to excel or pdf all the columns has width of 1 cm.How can I export to excel/pdf and make autosize to columns or keep the width columns from the grid?(in grid the columns has autosize and looks fine).
Thanks
Best Answer
Please try to call
grdExport.BestFitColumns
Methodand set
grdExport.OptionsPrint.AutoWidth
property tofalse
.Check this Question