2012Q1 RadGridView implicit style does not show group header

8 posts, 1 answers
  1. David
    David avatar
    18 posts
    Member since:
    Apr 2016

    Posted 08 Jun Link to this post

    Hi. I have an strange behaviour, but I cannot tell when did it happen. I just have a project with a view containing a radgridview, using implicit styles, but the group header is not shown. Whenever I put another radgridview in the same view without any attribute set, also the header is not shown, but it is shown if I am using it in a view of a new project without implicit styles.

     

    Did anyone got this problem and found a solution?

     

    Thanks.

     

    David.

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    368 posts

    Posted 09 Jun Link to this post

    Hello David,

    Could you please provide more information about the exact setup at your end so that I may better assist you in finding a solution:

    1) What attributes have you set to your RadGridView?
    2) Just to make sure - are you referring to the GridViewHeaderRow or GridViewGroupRow/GroupHaderRow element?
    3) Is the GroupRenderMode of your RadGridView set to Flat or Nester?
    4) Have you defined any styles, targeting the GridViewHeaderRowGridViewGroupRow or GroupHeaderRow elements?

    Bear in mind that when using Implicit Styles you should base those styles on GridViewHeaderRowStyleGridViewGroupRowStyle and GroupHeaderRowStyle, respectively.

    Please also note that, as stated in the Grouping Modes article I've referenced above, when dealing with GroupRenderMode="Flat", you should target the GroupHeaderRow element as opposed to Nested mode's GridViewGroupRow element.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. David
    David avatar
    18 posts
    Member since:
    Apr 2016

    Posted 09 Jun Link to this post

    Thank you very much for your answer. As soon as I have a new time window I will paste the xaml part and verify everything you wrote in your email.

     

    David.

  5. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    368 posts

    Posted 09 Jun Link to this post

    I will be awaiting your reply, David.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. David
    David avatar
    18 posts
    Member since:
    Apr 2016

    Posted 09 Jun Link to this post

    Keep in mind that is version 2012 Q1, so the GroupRenderMode is not defined. The list have no style applied but the default implicit that is copied from OfficeBlue. The only style is for the row.

    This is how I have included the radgridview. 

    <telerik:RadGridView x:Name="_lvOrders" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False"
        Focusable="True"
        SelectionMode="Extended" Margin="0"
        ColumnWidthChanged="_lvOrders_ColumnWidthChanged"
        ColumnReordering="_lvOrders_ColumnReordering"
        CellLoaded="_lvOrders_CellLoaded" CellEditEnded="_lvOrders_CellEditEnded"
        SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
        ItemsSource="{Binding ViewItems, Mode=TwoWay}">
        <telerik:RadGridView.RowStyle>
            <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
                <Setter Property="Background" Value="{Binding Blockings,Converter={StaticResource BudgetBlocking2RowColorConverter}}"></Setter>
            </Style>
        </telerik:RadGridView.RowStyle>
        <i:Interaction.Behaviors>
            <lbehaviours:GridMultiSelectBehavior SelectedItems="{Binding SelectedItems}" />
        </i:Interaction.Behaviors>
    </telerik:RadGridView>

  7. David
    David avatar
    18 posts
    Member since:
    Apr 2016

    Posted 09 Jun Link to this post

    Just to confirm. I've made a new solution with two projects, one of them default installed DLLs, and other with NoXaml. The first the group header is shown, in the second one (implicit styles), the group is hidden.

     

    I've added:

    Telerik.Windows.Controls

    Telerik.Windows.Controls.GridView

    Telerik.Windows.Controls.Input

     

    and for implicit styling in resources and in App.xaml resources dictionary:

     

    System.Windows.xaml

    Telerik.Windows.Controls.xaml
    Telerik.Windows.Controls.GridView.xaml
    Telerik.Windows.Controls.Input.xaml

     

    What should I do to allow group header to be visible when using implicit styling?

     

    Regards,

     

    David.

  8. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    368 posts

    Posted 10 Jun Link to this post

    Hello David,

    Please excuse me for the misunderstanding.

    If I'm not mistaken, you're referring to RadGridView's Group Panel, which is not visible when using the Q1 2012 SP1 NoXaml binaries. That was an issue with that particular version but it has been fixed in the Q2 2012 release. Updating to this version of the controls would solve this problem, but I would recommend upgrading to the most recent version of the suite if possible.
      
    A simple workaround I can offer, however, is to create a style, targeting the GridViewGroupPanel element with a Visibility property set to Visible and set it as the GroupPanelStyle of your RadGridView instance. Here's how to do that:

    <Style x:Key="MyGridViewGroupPanelStyle" TargetType="telerik:GridViewGroupPanel" BasedOn="{StaticResource GridViewGroupPanelStyle}">
        <Setter Property="Visibility" Value="Visible" />
    </Style>

    <telerik:RadGridView GroupPanelStyle="{StaticResource MyGridViewGroupPanelStyle}" />

    Please let me know if this approach works for you.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  9. David
    David avatar
    18 posts
    Member since:
    Apr 2016

    Posted 13 Jun in reply to Dilyan Traykov Link to this post

    Sorry for late answer. I was off on friday. I tested this today and works like a charm. Thankyou very much.

     

    Kind regards,

     

    David.

Back to Top
UI for WPF is Visual Studio 2017 Ready