Hello
Could you please help me with some sample where I can export from XamDataGrid into excel?
Only condition I have is - I have couple of grouping columns and I want those grouping remain as it is.
Cheers
Sagar
Hello Sagar,
Thank you for your post. I am attaching a sample for you showing how to achieve exporting of the xamDataGrid’s content in MS Excel format. If you group the data by some field before the exporting and later press the export button the exported data will contains grouping too.
Here is a link which contains additional information regarding Excel exporting:
http://help.infragistics.com/doc/WPF?page=xamDataGrid_Exporting_to_Excel.html
Please do not hesitate to let me know if you have any further questions on this matter.
Sincerely,
Radko Kolev
Infragistics Inc.
www.infragistics.com/support
Hello Radko,
Your sample does work for me in some extent. However, few formatting of cells not retain from grid to excel.
1. In some of the cells, I display values using prefix with tab character /t. This tab space is not remains in excel.
2. there is one blank row appears in between grouping.
3. Going forward, I will be using foreground and background colour for specific cells. How do I make sure this is maintain after excel export.
I have a template column displaying the button with color and text on it. How do I export to excel? At least the text.
Template:
<Style x:Key="CreditAlertButtonTemplate" TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<Button x:Name="CreditAlertButton" Content="{Binding DataItem.CreditAlert, Converter={StaticResource CreditAlertToContextConverter}}" Style="{StaticResource CircleButton}" Width="20" Height="auto"
Background ="{Binding DataItem.CreditAlert, Converter={StaticResource CreditAlertToColorConverter}}"
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Please advise.
Hello raj,
Please find my dedicated to your issue reply in the following forum thread:
http://www.infragistics.com/community/forums/p/104277/493335.aspx
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
Hi Radko,
Not sure what was issue with my 14.1 sample.
I created complete new solution with 15.2 and it did work for me,
Thanks again.
Thank you for your feedback.
I am very glad that you have manage to resolve your issue.
If you require any further assistance, please do not hesitate to ask.