Group Descriptors Header

9 posts, 1 answers
  1. Barry
    Barry avatar
    90 posts
    Member since:
    Jul 2011

    Posted 20 Mar 2013 Link to this post

    There is a space that is created in the header of the gridview when you add Group Descriptors like this:
    <telerik:RadGridView.GroupDescriptors>
       <telerik:GroupDescriptor Member="Tamcn" SortDirection="Ascending"  >
            <telerik:GroupDescriptor.AggregateFunctions>
                <telerik:CountFunction Caption="Item Count: " />
            </telerik:GroupDescriptor.AggregateFunctions>
        </telerik:GroupDescriptor>
    </telerik:RadGridView.GroupDescriptors>

    And I need to know how to edit the style... it is showing up as the regular Telerik style (office black) and I have a custom style on my gridview and I need that little piece to look the same. Attached is a screen shot of what I'm talking about.
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 20 Mar 2013 Link to this post

    Hello Barry,

     

    Have you checked the following online help article? 


    Regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Barry
    Barry avatar
    90 posts
    Member since:
    Jul 2011

    Posted 20 Mar 2013 Link to this post

    I just need to change the background and this doesn't seem to work:

    <Style TargetType="telerik:GridViewHeaderIndentCell">
        <Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}" />
    </Style>

    This works fine:

    <Style TargetType="telerik:GridViewFooterCell">
       <Setter Property="Background" Value="{StaticResource ControlBackgroundNormalGreen}" />
    </Style>

    So why doesn't the first one work?
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 20 Mar 2013 Link to this post

    Hi Barry,

     


    Can you point us to the exact version of RadControls/Silverlight you are currently using? I have performed some tests against Q1 2013 release where everything seems to work correctly.
    You may check the attached project for further reference. 



    Regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Barry
    Barry avatar
    90 posts
    Member since:
    Jul 2011

    Posted 20 Mar 2013 Link to this post

    I'm working with 2012.1.215.1040, which is the latest we can use because we cannot go to Silverlight 5. It just doesn't work no matter what...
  7. Barry
    Barry avatar
    90 posts
    Member since:
    Jul 2011

    Posted 20 Mar 2013 Link to this post

    I've even tried putting a background on the IndentPresenter... but that doesn't work either.

    <telerik:IndentPresenter x:Name="PART_IndentPresenter"
                     Grid.Row="1"
                     Grid.Column="1"
                     MinHeight="{TemplateBinding MinHeight}"
                     Background="Red"
                     IndentLevel="{TemplateBinding IndentLevel}"
                     ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}"
                     telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" />

    And here...

    <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
      <telerik:GridViewHeaderIndentCell Background="Orange"  />
    </DataTemplate>

    doesn't work...
  8. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 20 Mar 2013 Link to this post

    Hi Barry,

     

    Thank you for getting back to us! I can confirm that we had such an issue, where the Background of this element cannot be set with a simple style. For the time being I may suggest you to directly predefine the template of GridViewHeaderIndentCell and modify its Background from there, as follows:


    <SolidColorBrush x:Key="GridView_HeaderInnerBorder" Color="#FF4B4B4B"/>
        <SolidColorBrush x:Key="GridView_HeaderRowOuterBorder" Color="#FF848484"/>
        <SolidColorBrush x:Key="GridView_HeaderRowBackground" Color="Red"/>
        <Style TargetType="telerik:GridViewHeaderIndentCell">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:GridViewHeaderIndentCell">
                        <Border x:Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="25">
                            <Border x:Name="InnerBorder" BorderBrush="{StaticResource GridView_HeaderInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderThickness" Value="0 0 1 1"/>
            <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderRowOuterBorder}"/>
            <Setter Property="Background" Value="{StaticResource GridView_HeaderRowBackground}"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="Padding" Value="0"/>
        </Style>



    Would it be possible to try with this one and let me know how it goes? 


    Kind regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  9. Barry
    Barry avatar
    90 posts
    Member since:
    Jul 2011

    Posted 20 Mar 2013 Link to this post

    I was hopeful that this would work, but it doesn't seem to take the style at all... I tried changing the background... and then a few other properties like the width and border colors... it doesn't change anything on the indent cell at all.

    It looks like my only option is to hide the indent cell and set the indent on the content to zero so it still lines up with the regular column headers. This should work okay since I'm setting the groupings and they cannot be changed by the user, but it would be nice to be able to go to the latest version so the simple style would work. Its just that my users don't have silverlight 5...
  10. Barry
    Barry avatar
    90 posts
    Member since:
    Jul 2011

    Posted 20 Mar 2013 Link to this post

    Actually, forget my last post... the last code worked. I had set the old style in the page as well as the resource dictionary, so I had to get rid of the style in the page for the other style to work. It works now... thanks!
Back to Top
DevCraft banner