Is it possible to dock column footer at the top of the grid ?

8 posts, 1 answers
  1. Joachim
    Joachim avatar
    39 posts
    Member since:
    Jul 2010

    Posted 12 Oct 2010 Link to this post

    Hello Telerik Team !

    I'm using your last version of Telerik Rad Controls for Silverlight an i was wondering if it was possible to dock the column footers at the top of the grid instead of the bottom ?
    What i want to do is to use aggregate functions within this column footer to show the sum or average of all the cell value in a column.

    Thank you for your help !

    Joachim.
  2. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 13 Oct 2010 Link to this post

    Hi Joachim,

    In order to be able to perform and  display different calculations in a GridViewColumns, I recommend you to see the following Totals demo. Considering your second question I have prepared an example for you that demonstrates how to show GridViewFooterRow under the GridViewHeaderRow through editing the template of the RadGridView.

    Please see the attached and if you need any additional information please let me know.

    Best wishes,
    Vanya Pavlova
    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
  3. Joachim
    Joachim avatar
    39 posts
    Member since:
    Jul 2010

    Posted 13 Oct 2010 Link to this post

    Yes, It's exactly what i need !
    Thank you Vanya for your usefull help.

    Why don't you share all your samples projects in a repository on your web site ? (in the resource section for example)
    I think it might be very usefull and free your time ;)

    Thanks again Vanya.
  4. Alexandre
    Alexandre avatar
    2 posts
    Member since:
    Dec 2010

    Posted 26 Jan 2011 Link to this post

    Hi,

    This is exactly what I need but I would like the keep the footer row in the header even when the group is expended, do you think that it would be possible ?

    Regards,
    Alex
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 27 Jan 2011 Link to this post

    Hi Joachim,

     
    With the current implementation of GridViewGroupRow such an attempt may result in an unexpected behavior and I strongly advocate to keep its default appearance.

    Regards,
    Vanya Pavlova
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Gopala
    Gopala avatar
    28 posts
    Member since:
    Jul 2012

    Posted 03 Jul 2012 Link to this post

    Hi,

    I also need same thing. If my scroll bars has default styles it is working good but if I use my styles then footer row is over lapping my vertical scroll bar as shown in attachment. Please help me out.
  7. Gopala
    Gopala avatar
    28 posts
    Member since:
    Jul 2012

    Posted 05 Jul 2012 Link to this post

    I was able to solve this like below

    <ControlTemplate TargetType="telerik:RadGridView">
              <Border x:Name="PART_MasterGridContainer"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      Padding="{TemplateBinding Padding}">
                <VisualStateManager.VisualStateGroups>
                  <VisualStateGroup x:Name="GridViewActivity">
                    <VisualState x:Name="Idle">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_GridViewLoadingIndicator">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Collapsed" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Busy">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_GridViewLoadingIndicator">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Visible" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                  </VisualStateGroup>
                  <VisualStateGroup x:Name="ColumnHeadersVisibility">
                    <VisualState x:Name="ColumnHeadersVisible">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_HeaderRow">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Visible" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ColumnHeadersCollapsed">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_HeaderRow">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Collapsed" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                  </VisualStateGroup>
                  <VisualStateGroup x:Name="ColumnFootersVisibility">
                    <VisualState x:Name="ColumnFootersVisible">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_FooterRow">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Visible" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ColumnFootersCollapsed">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_FooterRow">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Collapsed" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                  </VisualStateGroup>
                  <VisualStateGroup x:Name="GroupPanelVisibility">
                    <VisualState x:Name="GroupPanelVisible">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_GroupPanel">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Visible" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                    <VisualState x:Name="GroupPanelCollapsed">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_GroupPanel">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Collapsed" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                  </VisualStateGroup>
                  <VisualStateGroup x:Name="InsertRowVisibility">
                    <VisualState x:Name="InsertRowVisible">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_AddNewRow">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Visible" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InsertRowCollapsed">
                      <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                       Storyboard.TargetName="PART_AddNewRow">
                          <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                  Value="Collapsed" />
                        </ObjectAnimationUsingKeyFrames>
                      </Storyboard>
                    </VisualState>
                  </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <Grid x:Name="HierrarchyBackground"
                      Background="{TemplateBinding Background}">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition x:Name="ScrollBarColumn"
                                      MinWidth="0"
                                      Width="0" />
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition x:Name="PART_AttachedBehaviorRow"
                                   Height="Auto" />
                    <RowDefinition />
                    <RowDefinition x:Name="ScrollBarRow"
                                   Height="0"
                                   MinHeight="0" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <telerik:GridViewGroupPanel x:Name="PART_GroupPanel"
                                              BorderBrush="{StaticResource GridView_GroupPanelOuterBorder}"
                                              Background="{TemplateBinding GroupPanelBackground}"
                                              Grid.ColumnSpan="2"
                                              Foreground="{TemplateBinding GroupPanelForeground}"
                                              Grid.Row="0"
                                              telerik:StyleManager.Theme="{StaticResource Theme}" />
     
                  <telerik:GridViewScrollViewer x:Name="PART_ItemsScrollViewer"
                                                Background="Transparent"
                                                CanContentScroll="True"
                                                Grid.ColumnSpan="2"
                                                Grid.Row="2"
                                                Grid.RowSpan="2"
                                                Style="{StaticResource GridViewScrollViewerStyle1}">
     
                    <telerik:GridViewScrollViewer.FooterRow>
                      <telerik:GridViewFooterRow x:Name="PART_FooterRow"
                                                 IndentLevel="{TemplateBinding GroupCount}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}"/>
                    </telerik:GridViewScrollViewer.FooterRow>
                    
                    <telerik:GridViewScrollViewer.HeaderRow>
                      <telerik:GridViewHeaderRow x:Name="PART_HeaderRow"
                                                 IndentLevel="{TemplateBinding GroupCount}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </telerik:GridViewScrollViewer.HeaderRow>
                    <telerik:GridViewScrollViewer.NewRow>
                      <telerik:GridViewNewRow x:Name="PART_AddNewRow"
                                              IndentLevel="{TemplateBinding GroupCount}"
                                              telerik:StyleManager.Theme="{StaticResource Theme}"
                                              Visibility="Collapsed" />
                    </telerik:GridViewScrollViewer.NewRow>
                    
                    <telerik:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"/>
                  </telerik:GridViewScrollViewer>
     
     
                  <telerik:ScrollPositionIndicator x:Name="PART_ScrollPositionIndicator"
                                                   Grid.ColumnSpan="2"
                                                   ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"
                                                   HorizontalAlignment="Right"
                                                   IsHitTestVisible="False"
                                                   Margin="0,0,28,0"
                                                   Grid.Row="2"
                                                   telerik:StyleManager.Theme="{StaticResource Theme}"
                                                   Visibility="{Binding IsScrolling, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <Border x:Name="PART_FrozenColumnsPreview"
                          Background="#33000000"
                          HorizontalAlignment="Left"
                          Grid.Row="1"
                          Grid.RowSpan="4"
                          Visibility="Collapsed"
                          VerticalAlignment="Stretch"
                          Width="6" />
                  <telerik:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"
                                                    Grid.ColumnSpan="2"
                                                    Grid.RowSpan="4"
                                                    telerik:StyleManager.Theme="{StaticResource Theme}"
                                                    Visibility="Collapsed" />
                </Grid>
              </Border>
            </ControlTemplate>


    void grid_Loaded(object sender, RoutedEventArgs e)
        {
          GridViewScrollViewer scroller = gridCusip.ChildrenOfType<GridViewScrollViewer>().Where(b => b.Name == "PART_ItemsScrollViewer").FirstOrDefault();
          if (scroller != null)
          {
            scroller.FooterRow.RowIndicatorVisibility = Visibility.Visible;
            Grid.SetRow(scroller.FooterRow, 1);
          }
         
        }
  8. Eric
    Eric avatar
    3 posts
    Member since:
    Jun 2011

    Posted 16 Feb 2013 Link to this post

    Is there anyway to do this with the Windows8/Metro skin. i have issues with the toggle button not showing, or being un-clickable. Also is it possible to hide the expand button if there is only one item in each group?

    Many Thanks.
Back to Top