
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker
asked on 12 Feb 2012, 03:54 PM
I understand why ExcelML export doesn't work on TemplateColumns out of the box, but it would be nice if you placed somewhere on the top of your ExcelML documentation something like "Limitation: this will not work with TemplateColumns". I would rather know there is a limitation than spending time trying to figure out why the control won't work the way I expected.
Furthermore, I have seen numerous posts about this issue (many of which would likely be unecessary with the little bit of additional documentaiton I mentioned above) and most of these point to a link which no longer exists ("Export Tips and tricks"), claiming there is some way to get the ExcelML export to work with template columns. So my question, since there doesn't seem to be any documentation, is do you have a work-around to be able to get template columns to export in an ExcelML scenario? If so, can you provide a VB example?
Furthermore, I have seen numerous posts about this issue (many of which would likely be unecessary with the little bit of additional documentaiton I mentioned above) and most of these point to a link which no longer exists ("Export Tips and tricks"), claiming there is some way to get the ExcelML export to work with template columns. So my question, since there doesn't seem to be any documentation, is do you have a work-around to be able to get template columns to export in an ExcelML scenario? If so, can you provide a VB example?
8 Answers, 1 is accepted
0

RvdGrint
Top achievements
Rank 1
answered on 13 Feb 2012, 08:46 AM
Albert,
if you specify the DataField property of the template column than the export will work.
Regards,
Jos.
if you specify the DataField property of the template column than the export will work.
Regards,
Jos.
0

Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 13 Feb 2012, 02:02 PM
My template column displays data which must be processed and calculated in a complex manner. This is why I use a template column instead of one of the built-in databound columns. So, there is no single datafield which applies to each templatecolumn. Is it sufficient to set the datafield to ANY value, even if that value is not used?
0

RvdGrint
Top achievements
Rank 1
answered on 13 Feb 2012, 02:10 PM
If you DataField a value, even if it does not exists, the ExcelML export will work. In my case it does.
Regards,
Jos
Regards,
Jos
0

Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 13 Feb 2012, 02:38 PM
In my testing, if you set the DataField to an existing field, then this field gets exported, not the actual values in the TemplateColumn. If you set the DataField property to something other than empty (set to a field that doesn't exist like "Test"), then the column doesn't get exported at all, just like if you don't set the DataField at all.
0

RvdGrint
Top achievements
Rank 1
answered on 13 Feb 2012, 02:44 PM
0

RvdGrint
Top achievements
Rank 1
answered on 13 Feb 2012, 02:44 PM
Albert,
maybe this will be helpfull: http://stackoverflow.com/questions/3118206/radgrid-exporting-to-csv-does-not-include-template-column
Regards,
Jos
maybe this will be helpfull: http://stackoverflow.com/questions/3118206/radgrid-exporting-to-csv-does-not-include-template-column
Regards,
Jos
0

Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 13 Feb 2012, 03:12 PM
Thanks for the suggestion. I am exporting to Excel, not CSV, and the links you provided seemed to show that they are NOT doing anything special in the Excel export as opposed to the CSV export. Anyhow, I tried the method of setting the Text property prior to export and still got no results.
0
Hello,
Please examine the sample project attached to this post in order to see how the desired functionality can be implemented.
I hope this helps.
Kind regards,
Mira
the Telerik team
Please examine the sample project attached to this post in order to see how the desired functionality can be implemented.
I hope this helps.
Kind regards,
Mira
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>