![](/forums/images/avatarimages/default.gif)
Elver Emilio Cano Cardona
Top achievements
Rank 1
Elver Emilio Cano Cardona
asked on 20 Apr 2011, 03:35 PM
Hi.. how are you..
I am exporting a GridView with several columns... one of them is a type checkbox..it's neccesary to chose the rows in the grid.
see attach name "GridViewCheckBox.JPG" and i need export the information in the grid but when i export it.. He put the the field Checkbox like FALSE OR TRUE (see the image "exportexcelgridview.jpg" ) and need that export without this column.. there a option when i am exporting can i chose wich column want to export ?? and i neet to show the column like Checkbox..
Thanks very much..
I am exporting a GridView with several columns... one of them is a type checkbox..it's neccesary to chose the rows in the grid.
see attach name "GridViewCheckBox.JPG" and i need export the information in the grid but when i export it.. He put the the field Checkbox like FALSE OR TRUE (see the image "exportexcelgridview.jpg" ) and need that export without this column.. there a option when i am exporting can i chose wich column want to export ?? and i neet to show the column like Checkbox..
Thanks very much..
6 Answers, 1 is accepted
0
![](/forums/images/avatarimages/7e2693e1-3f45-482c-af58-697bf0784614multepos.png)
Richard Slade
Top achievements
Rank 2
answered on 20 Apr 2011, 05:26 PM
Hello,
I'll try and answer your questions as I currently understand them.
1: You can export only certain rows on the grid by first filtering the grid based on the criteria you wish to show in the export. For more information on filtering please refer to this help topic. Once you have filtered and exported, you can clear the filters if you wish. In order to use this you need to set:
2: You can export only certain columns by hiding the columns before export, and showing them again after, and in your export options choose.
3: you can format the output as it is being rendered by using the ExcelCellFormatting event.
Please refer to this help topic for more information
I hope that helps but please let me know if you have any questions
Richard
I'll try and answer your questions as I currently understand them.
1: You can export only certain rows on the grid by first filtering the grid based on the criteria you wish to show in the export. For more information on filtering please refer to this help topic. Once you have filtered and exported, you can clear the filters if you wish. In order to use this you need to set:
exporter.HiddenRowOption = HiddenOption.DoNotExport;
2: You can export only certain columns by hiding the columns before export, and showing them again after, and in your export options choose.
exporter.HiddenColumnOption = HiddenOption.DoNotExport;
3: you can format the output as it is being rendered by using the ExcelCellFormatting event.
Please refer to this help topic for more information
I hope that helps but please let me know if you have any questions
Richard
0
![](/forums/images/avatarimages/default.gif)
Praveena
Top achievements
Rank 1
answered on 22 Nov 2011, 10:23 AM
Hi all,
I have 3 radgrids in my form. One below the other. Now i have to export all the 3 radgrids data into excel one after the other. Please let me know how to achieve it.
From the above code one datagrid data is exported. However i am not sure how to export all three radgrid data. Please help me at the earliest
Thanks and Regards,
A.Praveena devi
I have 3 radgrids in my form. One below the other. Now i have to export all the 3 radgrids data into excel one after the other. Please let me know how to achieve it.
exporter = new ExportToExcelML(this.dgPurpose);
exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
exporter.SheetName = "Sheet";
string fileName = "D:\\ExportedData123.xls";
exporter.RunExport(fileName);
From the above code one datagrid data is exported. However i am not sure how to export all three radgrid data. Please help me at the earliest
Thanks and Regards,
A.Praveena devi
0
Hello Praveena,
Thank you for writing.
We do not support exporting different RadGridViews into one and the same Excel file. We will include this functionality in one of the future release, if we have more customer requests for the same.
Let me know if you have any other questions.
Kind regards,
Martin Vasilev
the Telerik team
Thank you for writing.
We do not support exporting different RadGridViews into one and the same Excel file. We will include this functionality in one of the future release, if we have more customer requests for the same.
Let me know if you have any other questions.
Kind regards,
Martin Vasilev
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
0
![](/forums/images/avatarimages/default.gif)
Praveena
Top achievements
Rank 1
answered on 25 Nov 2011, 07:55 AM
Hi Martin,
I somehow achieved this. What i did is created one datatable which will have all the rows of 3 girds. Then programatically i created radgrid with columns exactly matching to that datatable and rows binded from that datatable. After that i exported that rad grid to excel. Final result is achieved. However i am struck up now with formatting. Is there a way to merge excel cells only for rows (not headers) when we export through excel? If that is not possible atleast can we make wrap text and headers bold when we export to excel from rad grid?
Thanks and Regards,
Praveena
I somehow achieved this. What i did is created one datatable which will have all the rows of 3 girds. Then programatically i created radgrid with columns exactly matching to that datatable and rows binded from that datatable. After that i exported that rad grid to excel. Final result is achieved. However i am struck up now with formatting. Is there a way to merge excel cells only for rows (not headers) when we export through excel? If that is not possible atleast can we make wrap text and headers bold when we export to excel from rad grid?
Thanks and Regards,
Praveena
0
![](/forums/images/avatarimages/default.gif)
Praveena
Top achievements
Rank 1
answered on 28 Nov 2011, 06:02 AM
Hi,
I have explored and completed on formatting like bold, font size, wrap text, back color and fore color. However i have to do text orientation. Like if there is any any date like 12/12/2010. It should be rotated (say eg -90) text orientation property whch we have in excel. It will be rotated to vertical and appear. Is it possible to achieve. Please reply me at the earliest.
Regards,
Praveena.
I have explored and completed on formatting like bold, font size, wrap text, back color and fore color. However i have to do text orientation. Like if there is any any date like 12/12/2010. It should be rotated (say eg -90) text orientation property whch we have in excel. It will be rotated to vertical and appear. Is it possible to achieve. Please reply me at the earliest.
Regards,
Praveena.
0
Hi Praveena,
Thank you for getting back to me.
I am glad you found a work-around for exporting more than one grid into one and the same file and you have found your way through the cell formatting. Unfortunately, our export function does not support cell merge nor changing the text orientation. We will add these features in our list for consideration when we plan our next releases.
Hope this helps. Let me know if you have any other questions.
Greetings,
Ivan Petrov
the Telerik team
Thank you for getting back to me.
I am glad you found a work-around for exporting more than one grid into one and the same file and you have found your way through the cell formatting. Unfortunately, our export function does not support cell merge nor changing the text orientation. We will add these features in our list for consideration when we plan our next releases.
Hope this helps. Let me know if you have any other questions.
Greetings,
Ivan Petrov
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.