I have some problems using the Excel Exporter on a WHDG.
The grid and excel exporter:
The grid and the excel exporter are on the same asp:UpdatePanelThe grid does have a custom pager like the one of the samples (WebDataGrid)The grid uses a DataSet as DataSource that I rebind on every PostBack.
<ig:WebHierarchicalDataGrid ID="whdg" runat="server" Width="980px" AutoGenerateColumns="False" AutoGenerateBands="false" EnableAjax="true" EnableAjaxViewState="true" EnableTheming="true" EnableDataViewState="true" StyleSetName="Claymation" DataKeyFields="ID" InitialExpandDepth="0" InitialDataBindDepth="0" OnInitializeRow="whdg_InitializeRow" OnColumnSorted="whdg_ColumnSorted">
<ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300"/>
<AjaxIndicator Enabled="True"/>
<Behaviors>
<ig:Activation Enabled="false">
</ig:Activation>
<ig:Sorting Enabled="true" SortingMode="Single">
<ColumnSettings>
<ig:SortingColumnSetting ColumnKey="TipoImage" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="Usuario" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="FechaHora" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="Accion" Sortable="true"/>
<ig:SortingColumnSetting ColumnKey="Mensaje" Sortable="true"/>
</ColumnSettings>
</ig:Sorting>
<ig:Paging Enabled="true">
<PagerTemplate>
<ag:WebDataGridPaginacion ID="whdgPaginacion" runat="server" OnPageChanged="whdgPaginacion_PageChanged"/>
</PagerTemplate>
</ig:Paging>
</Behaviors>
<EmptyRowsTemplate><div style="text-align:center;width:980px;padding:45px 0">No hay datos disponible.</div></EmptyRowsTemplate>
<Columns>
<ig:BoundDataField Key="ID" DataFieldName="SeguimientoID" Hidden="true"/>
<ig:BoundDataField Key="TipoImage" DataFieldName="Tipo" Header-Text="Tp" Width="36px"/>
<ig:BoundDataField Key="Usuario" DataFieldName="Usuario" Header-Text="Usuario" Width="142px"/>
<ig:BoundDataField Key="FechaHora" DataFieldName="FechaHora" Header-Text="Fecha y hora" Width="140px" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}"/>
<ig:BoundDataField Key="Accion" DataFieldName="Accion" Header-Text="Acción" Width="180px"/>
<ig:BoundDataField Key="Mensaje" DataFieldName="Mensaje" Header-Text="Mensaje" Width="452px"/>
</Columns>
</ig:WebHierarchicalDataGrid>
<ig:WebExcelExporter ID="WebExcelExporter1" runat="server" ExportMode="Download" DataExportMode="AllDataInDataSource" WorkbookFormat="Excel2007" EnableStylesExport="true" OnCellExporting="WebExcelExporter1_CellExporting"/>
Version: 10.3.20103.2105
I haven't had time to build a code sample that demonstrates this... I have other projects to work on. Maybe I will have time soon, but no guarantees.
Infragistics knows about the issue from multiple sources. I hope that they are putting some effort into fixing it for an upcoming SR.
Infragistics, if you want to duplicate the issue, it's easy. Just put a button on a page, and build the dataset, webdatagrid and webexcelexporter inside the button click, assign the IG styleset to the webdatagrid using the CDN, and export. The style won't be exported. If you fix that scenario, you will almost certainly fix many of the other scenarios where the styles don't export.
And if the style does export, then please post the code so I can see how you did it!
Hello,
I'm facing the same issue. Post is old, but still important. Any update?
Checking to see if there is an update on this topic.
I have just upgraded to 12.2, and I am still having issues with the StyleSetName not being honored by WebExcelExporter. I am using Infragistics styles, with the CDN.
I have some use case scenarios where I need to build the grid and export it all in one step. The grid isn't visible, and I don't want to put the datatable in session state.
Help, pretty please? Hoping for a simple answer!
Got it working...
If you are rebinding the grid on page load by clearing the datasource, columns, etc, and rebuilding the grid, then the Excel Exporter goes whacky. Column headers for example are missing, and styles appear to be incomplete.
However, if I save the datatable to session state and just set the datasource of the grid on page load, everything works fine.
I am encountering a similar problem... styles are not honored on export.
I am using the CDN, with "out of the box" Infragistics styles.
Does pulling the style from the CDN prevent the Excel exporter from being able to see the style?