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

2012Q1 RadGridView implicit style does not show group header

7 Answers 152 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 08 Jun 2016, 01:14 PM

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.

7 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 09 Jun 2016, 08:44 AM
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.
0
David
Top achievements
Rank 1
answered on 09 Jun 2016, 11:02 AM

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.

0
Dilyan Traykov
Telerik team
answered on 09 Jun 2016, 11:13 AM
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.
0
David
Top achievements
Rank 1
answered on 09 Jun 2016, 01:11 PM

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>

0
David
Top achievements
Rank 1
answered on 09 Jun 2016, 03:31 PM

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.

0
Accepted
Dilyan Traykov
Telerik team
answered on 10 Jun 2016, 10:16 AM
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.
0
David
Top achievements
Rank 1
answered on 13 Jun 2016, 09:44 AM

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

 

Kind regards,

 

David.

Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
David
Top achievements
Rank 1
Share this question
or