Hello,
I have a WebDataGrid I'm trying to export to Excel using the WebExcelExporter control. One of my grid columns is using a TemplateDataField. While this TemplateDataField only displays a number to the user, when it is exported to Excel, the Excel column contains the raw HTML within my TemplateDataField. Is there anyway for the Export control to only send the text rendered in the template field, and not the raw HTML?
I'm using NetAdvantage 10.3 CLR3x
Thanks!
Hello csthopper,
WebExcelExporter export only simple text templates.
For example:
<ItemTemplate > Name: <%# Eval("FirstName") %> <%# Eval("LastName") %></ItemTemplate >
ItemTemplate
>
"FirstName"
"LastName"
</
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3?page=Web_Known_Issues_and_Breaking_Changes_2010_Volume_3.html
Please let us know if you need further assistance.
How in the world am I supposed to export my grid with TemplateDataFields to Excel?
Hi,
You should handle gridRecordItemExporting, cancel it, and set the excell cell value to the value of the template you want to see. Simply find the template control in the grid cell.
regards,David Young
That's what i was thinking. although, i was looking at the RowExported event and thinking of just looping through each cell value and resetting the excel cell value, but the GridRecordItemExporting would probably be easier.
i already tried the GridRecordItemExporting event but i was setting the GridCell.Value and it wasn't having any effect.
Thanks for the tip.