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

6 posts, 0 answers
  1. Alain
    Alain avatar
    1 posts
    Member since:
    Feb 2013

    Posted 26 Mar 2013 Link to this post

    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
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 Mar 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 19 Sep 2013 Link to this post

    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
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Sep 2013 Link to this post

    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 >>
  6. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 20 Sep 2013 Link to this post

    Hi Didie,

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

    Thanks,

    Steven
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Sep 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready