While exporting data to Excel or CSV, height of row is auto. Our requirement is to expand width and height according to data available in cell mean user do not reuire to expand row height.
Please tell how to achieve this.
Currently we are taking data from grid and saving in excel with header.
3 Answers, 1 is accepted
0
Dimitrina
Telerik team
answered on 01 Jul 2014, 01:23 PM
Hi,
Do you export the data with RadGridView.Export() method or do you copy and paste it?
In case you export the data, you can check the documentation on how to configure the ExportFormats.Html options. When pasting, you cannot control from RadGridView what the height of the rows after pasting in Excel will be.
Regards,
Didie
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
You can then check the ExportFormats.ExcelML options, however, their capacity are not as rich as the ExportFormats.Html. When exporting to HTML, there is also another alternative: you can style the exported data setting the e.Styles dictionary with proper CSS values when the ElementExporting is raised for the RadGridView. You can refer to the "Exporting" demo for an example. Unfortunately this option is not available for the ExcelML format.
Regards,
Didie
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.