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

Misc. Help Needed

2 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 30 Jun 2011, 05:56 AM
Hello,

I am trying to acomplish the following with the RadGridView for WPF 4.0
  • Change the height and font of the header and footer rows.
  • Change the colour of the scroll bars to help them to stand out
  • Add an "expand all" and "collapse all" button to allow the user to manipulate groups in the grid all at once.

Thanks for any help!
John

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 30 Jun 2011, 06:35 AM
Hi John,

You may define styles targeting GridViewHeaderRow and GridViewFooterRow like follows:

<Window.Resources>
        <my:MyViewModel x:Key="MyViewModel"/>
        <Style x:Key="MyHeaderRowStyle" TargetType="telerik:GridViewHeaderRow">
            <Setter Property="Height" Value="67" />
        </Style>
        <Style x:Key="MyFooterRowStyle" TargetType="telerik:GridViewFooterRow">
            <Setter Property="Height" Value="67" />
        </Style>
    </Window.Resources>
 
 
<telerik:RadGridView Name="clubsGrid"
                             ItemsSource="{Binding Clubs}"
                             AutoGenerateColumns="False"
                             HeaderRowStyle="{StaticResource MyHeaderRowStyle}"
                             FooterRowStyle="{StaticResource MyFooterRowStyle}">                           


Considering styling of the scroll bars, you may take a look at this forum thread for a reference.
As for expanding and collapsing the groups, you may use the ExpandAllGroups() and CollapseAllGroups() methods of the grid:
this.clubsGrid.ExpandAllGroups();
this.clubsGrid.CollapseAllGroups();


 

Kind regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 03 Jul 2011, 05:39 AM
Hi Maya,

Thanks for the quick response!

I can see in your code where you are manipulating the thumb for the grid:
 <Track.Thumb>
   <Thumb x:Name="thumb" MinHeight="16" MinWidth="15" IsTabStop="False" SnapsToDevicePixels="True">
       <Thumb.Style>
           <Style TargetType="{x:Type Thumb}">

Is that correct? And if so, that is for the Vertical scroll, right? I tried a few things to get the Horizontal scroll but I am missing something...can you provide a little more guidance?

Thanks,
John
Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Maya
Telerik team
John
Top achievements
Rank 1
Share this question
or