This is a migrated thread and some comments may be shown as answers.

Have questions about export from radgridview

1 Answer 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kangroo
Top achievements
Rank 1
kangroo asked on 04 Aug 2017, 12:01 PM

hello im kangroo. im not much professional but i am working on a project and i have few questions about exporting from radgridview at winform.

1- i am trying to excel export and i want to set columns width for excel.i have tryed codes from demo.in there i can set width for current radgridview.but i don't want to change radgridview widht i want only change it at exporting to excel.How i can do?

2- is there any way to not export a column ? for example i don't want to export date column from radgridview.how i can?

3- in demo codes there is a example for add cloums to export to excel table. but that codes adding colums to current radgridview after complete of export. can i add columns to export table without adding to current radgridview?i want to create a cloumn for users may write some notes on excel export page

4- is there any way to set page size for excel export?i saw few codes in demo for pdf exporting for set size for page but can we do this in excel export?

 

i did search for this questions and i have read many documents about that but i did not understand how to fix these problems.If you can explain with example codes that would be very helpful.thank you.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 07 Aug 2017, 11:40 AM
Hi ,

Thank you for writing.

The SpreadExportRenderer class exposes the WorkbookCreated event which you can handle and manipulate the created workbook: http://docs.telerik.com/devtools/winforms/gridview/exporting-data/spread-export#events-WorkbookCreated. Once you start working with the Excel file you would need to use the spread processing libraries. Regarding your first and third questions please check the following articles: 

You can skip exporting certain columns by hiding them in the grid. This behavior is controlled by the HiddenColumnOption property: http://docs.telerik.com/devtools/winforms/gridview/exporting-data/spread-export#properties. After the export operation, you can restore the visible state of the hidden columns.

As to your last question, you can refer to the following documentation article providing detailed information: http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/worksheetpagesetup.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
kangroo
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or