This is a migrated thread and some comments may be shown as answers.

WPF - RadGridView(Grouped Columns) - Export Excel Issue - Horizontal Scrolling

5 Answers 104 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alain
Top achievements
Rank 1
Alain asked on 26 Mar 2013, 08:33 AM
Hi there,

I'm facing to a weird issue. I have a RadGridView that is using Grouper Headers and Horizontal Scrolling.

When I want to export the grid without have been playing with the scrolling, the grouped headers are not exported correctly in the excel file. It is like if only the visible groups on the screen are able to be exported.

In opposite if I play with the scrolling before exporting the grid, the grouped headers will be correctly exported.

Have you got any idea about this issue?

Thank you in advance.

Alain

<telerik:RadGridView x:Name="StudyDisplayAllDataGrid"
AutoGenerateColumns="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
AutoExpandGroups="True" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False"
IsReadOnly="True" GroupRenderMode="Flat"
Visibility="{Binding AnyProduct, Converter={StaticResource booleanToVisibleConverter}}"
ItemsSource="{Binding StudyProductsGrid}"/>


Using stream As IO.Stream = dialog.OpenFile()
            StudyDisplayAllDataGrid.Export(stream, New GridViewExportOptions() With { _
             .Format = ExportFormat.Html, _
             .ShowColumnHeaders = True, _
             .ShowColumnFooters = True, _
             .ShowGroupFooters = False _
            })
         End Using

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Mar 2013, 12:26 PM
Hello Alain,

Unfortunately this would be the expected behaviour as the grouped headers rely on the rendered GridView's Columns.
In your case you can programmatically scroll before the export is done so that the columns to be realized.
 

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Steven
Top achievements
Rank 1
answered on 19 Sep 2013, 02:37 PM
Hi,

I am also experiencing this issue and while scrolling works, it is less than ideal (having the screen jumping around without user input does not look great and can confuse the user).

Is there any reason that the columns that have not been rendered can be exported but the column groups cannot?

Thanks,

Steven
0
Dimitrina
Telerik team
answered on 20 Sep 2013, 08:50 AM
Hello Steven,

Have you set GroupRenderMode="Flat" for RadGridView? 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Steven
Top achievements
Rank 1
answered on 20 Sep 2013, 08:58 AM
Hi Didie,

Yes, I have the GroupRenderMode set to Flat on the RadGridView.

Thanks,

Steven
0
Dimitrina
Telerik team
answered on 20 Sep 2013, 01:08 PM
Hello Steven,

As the column virtualization is enabled by default, this scrolling needs to be done so that all the columns to be realized.
You can try setting ScrollMode="Deffered".
If this does not help, if your columns are not much, then you can set EnableColumnVirtualization="False". That way you will avoid the scrolling.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
General Discussions
Asked by
Alain
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Steven
Top achievements
Rank 1
Share this question
or