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

[Solved] [Urgent] Adding a description after the groupheader

6 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michele
Top achievements
Rank 2
Michele asked on 14 Dec 2009, 09:14 AM
Hello to everybody,
I've got a GridView that has got 3 grouping level and on the third I need to show right after the group descriptor a supplementary description that's taken from a column in the grid...how can I do this?

Here's my XAML
<UserControl x:Class="IFWebLight.Disallineamenti.Inquiry.Inquiry" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"   
    xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
    xmlns:data="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data" 
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    Loaded="UserControl_Loaded" SizeChanged="UserControl_SizeChanged" 
    xmlns:test="clr-namespace:IFWebLight.Disallineamenti.Inquiry"
    <UserControl.Resources> 
        <Style TargetType="grid:AggregateResultsList" x:Key="prova"
            <Setter Property="HorizontalAlignment" Value="Left"></Setter> 
        </Style> 
    </UserControl.Resources> 
    <Grid x:Name="LayoutRoot"
        <Grid.Resources> 
            <DataTemplate x:Key="ClickableHeaderTemplate" > 
                <Grid> 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition></ColumnDefinition
                        <ColumnDefinition></ColumnDefinition
                    </Grid.ColumnDefinitions> 
                    <test:GroupHeader Grid.Column="0"/> 
                    <TextBlock Text="{Binding Causa}" Grid.Column="1" Margin="5,0,5,0" x:Name="txAggregato"></TextBlock>  
                </Grid> 
            </DataTemplate> 
            <ControlTemplate x:Key="GridViewGroupRowTemplate" TargetType="grid:GridViewGroupRow"
                <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Background="{TemplateBinding Background}"
                    <grid:GridViewExpander x:Name="PART_GroupExpander" Grid.Column="1"  ExpandDirection="Down" RowIndicatorVisibility="{TemplateBinding RowIndicatorVisibility}" > 
                        <grid:GridViewExpander.Header> 
                            <Grid> 
                                <test:GroupHeader /> 
                            </Grid> 
                        </grid:GridViewExpander.Header> 
                        <grid:GroupVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel" /> 
                    </grid:GridViewExpander> 
                </Grid> 
            </ControlTemplate> 
            <Style x:Key="GridViewGroupRowStyle1" TargetType="grid:GridViewGroupRow"
                <Setter Property="HorizontalAlignment" Value="Left"/> 
                <Setter Property="Template" Value="{StaticResource GridViewGroupRowTemplate}"/> 
            </Style> 
            <telerik:Office_BlackTheme x:Key="Theme"/> 
            <Color x:Key="GridViewIndentCellBorderBrushColor">#FFB3B3B3</Color> 
            <SolidColorBrush x:Key="GridViewIndentCellBorderBrush" Color="{StaticResource GridViewIndentCellBorderBrushColor}"/> 
            <Color x:Key="GridViewIndicatorsPartsFillGradientStop1">#FF000000</Color> 
            <Color x:Key="GridViewIndicatorsPartsFillGradientStop2">#FF000000</Color> 
            <LinearGradientBrush x:Key="GridViewIndicatorsPartsFill" EndPoint="0.5,1" StartPoint="0.5,0"
                <GradientStop Color="{StaticResource GridViewIndicatorsPartsFillGradientStop1}" Offset="0"/> 
                <GradientStop Color="{StaticResource GridViewIndicatorsPartsFillGradientStop2}" Offset="1"/> 
            </LinearGradientBrush> 
            <ControlTemplate x:Key="GridViewExpanderToggleButtonTemplate" TargetType="ToggleButton"
                <Grid Background="{TemplateBinding Background}"
                    <VisualStateManager.VisualStateGroups> 
                        <VisualStateGroup x:Name="CheckStates"
                            <VisualState x:Name="Checked"
                                <Storyboard> 
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                        <SplineDoubleKeyFrame KeyTime="00:00:00.12" Value="0"/> 
                                    </DoubleAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
                            <VisualState x:Name="Unchecked"
                                <Storyboard> 
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                        <SplineDoubleKeyFrame KeyTime="00:00:00.12" Value="180"/> 
                                    </DoubleAnimationUsingKeyFrames> 
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundEllipse" Storyboard.TargetProperty="BorderThickness"
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="0,0,0,1"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
                        </VisualStateGroup> 
                    </VisualStateManager.VisualStateGroups> 
                    <Border x:Name="BackgroundEllipse" Width="24" UseLayoutRounding="True" BorderBrush="{StaticResource GridViewIndentCellBorderBrush}"
                        <Path x:Name="ExpanderButton" Fill="{StaticResource GridViewIndicatorsPartsFill}" Height="5" Width="7" RenderTransformOrigin="0.5,0.5" Data="M3,0 L4,0 4,0.99999972 5,0.99999993 5,1.9999999 6,1.9999999 6,2.9999999 7,2.9999999 7,3.9999999 7,4.9999999 6,4.9999999 5,4.9999999 5,3.9999999 4,3.9999999 4,2.9999999 3,2.9999999 3,3.9999999 2,3.9999999 2,4.9999999 1,4.9999999 0,4.9999999 0,3.9999999 0,2.9999999 1,2.9999999&#xa;1,1.9999999 2,1.9999999 2,0.99999972 3,0.99999972 z"
                            <Path.RenderTransform> 
                                <TransformGroup> 
                                    <ScaleTransform ScaleX="1" ScaleY="1"/> 
                                    <SkewTransform AngleX="0" AngleY="0"/> 
                                    <RotateTransform Angle="180"/> 
                                    <TranslateTransform X="0" Y="0"/> 
                                </TransformGroup> 
                            </Path.RenderTransform> 
                        </Path> 
                    </Border> 
                </Grid> 
            </ControlTemplate> 
            <Color x:Key="GridViewRowIndicatorBackgroundColor">#FFDBDEE1</Color> 
            <SolidColorBrush x:Key="GridViewRowIndicatorBackground" Color="{StaticResource GridViewRowIndicatorBackgroundColor}"/> 
            <ControlTemplate x:Key="GridViewExpanderTemplate" TargetType="grid:GridViewExpander"
                <Grid x:Name="PART_GroupExpanderGrid" HorizontalAlignment="Stretch"
                    <VisualStateManager.VisualStateGroups> 
                        <VisualStateGroup x:Name="ExpandStateGroup"
                            <VisualState x:Name="Expanded"
                                <Storyboard> 
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility"
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
                            <VisualState x:Name="Collapsed"
                                <Storyboard> 
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Visibility"
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
                        </VisualStateGroup> 
                        <VisualStateGroup x:Name="CommonStates"
                            <VisualState x:Name="Normal"/> 
                            <VisualState x:Name="Disabled"
                                <Storyboard> 
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GroupExpanderGrid" Storyboard.TargetProperty="Opacity"
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="0.5"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
                        </VisualStateGroup> 
                    </VisualStateManager.VisualStateGroups> 
                    <Grid.RowDefinitions> 
                        <RowDefinition x:Name="PART_HeaderRow"/> 
                        <RowDefinition x:Name="ContentRow"/> 
                    </Grid.RowDefinitions> 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="Auto"/> 
                        <ColumnDefinition/> 
                    </Grid.ColumnDefinitions> 
                    <grid:HorizontalScrollPanel x:Name="PART_HeaderScroller" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="0" HorizontalScrollEnabled="False" telerik:StyleManager.Theme="{StaticResource Theme}"
                        <Border x:Name="PART_GroupExpanderBorder" UseLayoutRounding="True" Background="{TemplateBinding IndentBackground}" BorderBrush="{TemplateBinding BorderBrush}"
                            <Grid x:Name="PART_HeaderGrid" MinHeight="{TemplateBinding MinHeight}"
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="Auto"/> 
                                    <ColumnDefinition Width="Auto"/> 
                                    <ColumnDefinition Width="Auto"/> 
                                    <ColumnDefinition Width="Auto"/> 
                                    <ColumnDefinition Width="*"/> 
                                </Grid.ColumnDefinitions> 
                                <grid:IndentPresenter BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Grid.Column="0" IndentLevel="{Binding Level}" telerik:StyleManager.Theme="{StaticResource Theme}"/> 
                                <ToggleButton x:Name="HeaderButton" VerticalAlignment="Stretch" Background="{TemplateBinding Background}" IsTabStop="False" Template="{StaticResource GridViewExpanderToggleButtonTemplate}" VerticalContentAlignment="Center" Grid.Column="1" IsChecked="{Binding IsExpanded}"/> 
                                <Border x:Name="ExpanderRowBottomBorder" Grid.Column="2" Grid.ColumnSpan="3" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1"/> 
                                <ContentPresenter Margin="3,0,3,0" VerticalAlignment="Center" Grid.Column="3" Content="{TemplateBinding Header}"
                                </ContentPresenter> 
                                <grid:AggregateResultsList HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="4" telerik:StyleManager.Theme="{StaticResource Theme}"
                                    <grid:AggregateResultsList.ItemsPanel> 
                                        <ItemsPanelTemplate> 
                                            <StackPanel Orientation="Horizontal"/> 
                                        </ItemsPanelTemplate> 
                                    </grid:AggregateResultsList.ItemsPanel> 
                                    <grid:AggregateResultsList.ItemTemplate> 
                                        <DataTemplate> 
                                            <grid:GridViewAggregateResultCell AggregateResult="{Binding}" telerik:StyleManager.Theme="{StaticResource Theme}"/> 
                                        </DataTemplate> 
                                    </grid:AggregateResultsList.ItemTemplate> 
 
                                </grid:AggregateResultsList> 
                            </Grid> 
                        </Border> 
                    </grid:HorizontalScrollPanel> 
                    <StackPanel x:Name="Content" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Background="{TemplateBinding IndentBackground}"
                        <ContentPresenter/> 
                        <grid:GridViewGroupFooterRow x:Name="Footer" telerik:StyleManager.Theme="{StaticResource Theme}"/> 
                    </StackPanel> 
                    <Border UseLayoutRounding="True" Grid.Column="1" Grid.Row="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,0"/> 
                    <grid:IndicatorPresenter x:Name="PART_IndicatorPresenter" Visibility="{TemplateBinding RowIndicatorVisibility}" Background="{StaticResource GridViewRowIndicatorBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Grid.Column="0" telerik:StyleManager.Theme="{StaticResource Theme}"/> 
                </Grid> 
            </ControlTemplate> 
            <Color x:Key="GridViewHierarchyAndGroupingColor">#FFFDDFAA</Color> 
            <Color x:Key="GridViewGroupingRowsColor">#FFFDF6E9</Color> 
            <LinearGradientBrush x:Key="GridViewExpanderBackground" EndPoint="0.5,1" StartPoint="0.5,0"
                <GradientStop Color="{StaticResource GridViewHierarchyAndGroupingColor}" Offset="1"/> 
                <GradientStop Color="{StaticResource GridViewGroupingRowsColor}" Offset="0"/> 
            </LinearGradientBrush> 
            <Color x:Key="GridViewBorderBrushColor">#FFB3B3B3</Color> 
            <SolidColorBrush x:Key="GridViewHeaderCellBorderBrush" Color="{StaticResource GridViewBorderBrushColor}"/> 
            <Color x:Key="GridViewHeaderCellForegroundColor">#FF000000</Color> 
            <SolidColorBrush x:Key="GridViewHeaderCellForeground" Color="{StaticResource GridViewHeaderCellForegroundColor}"/> 
            <SolidColorBrush x:Key="GridViewCellIndentBackground" Color="{StaticResource GridViewHierarchyAndGroupingColor}"/> 
            <Style x:Key="GridViewExpanderStyle1" TargetType="grid:GridViewExpander"
                <Setter Property="Template" Value="{StaticResource GridViewExpanderTemplate}"/> 
                <Setter Property="MinHeight" Value="24"/> 
                <Setter Property="Background" Value="{StaticResource GridViewExpanderBackground}"/> 
                <Setter Property="BorderBrush" Value="{StaticResource GridViewHeaderCellBorderBrush}"/> 
                <Setter Property="FontWeight" Value="Bold"/> 
                <Setter Property="Foreground" Value="{StaticResource GridViewHeaderCellForeground}"/> 
                <Setter Property="IndentBackground" Value="{StaticResource GridViewCellIndentBackground}"/> 
            </Style> 
        </Grid.Resources> 
        <Grid.Background> 
            <ImageBrush ImageSource=""></ImageBrush> 
        </Grid.Background> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="30"></RowDefinition> 
            <RowDefinition Height="Auto"></RowDefinition> 
        </Grid.RowDefinitions> 
        <Grid x:Name="gvFilter" Grid.Row="0" MinHeight="30" Height="30"
            <StackPanel Orientation="Horizontal"
 
                <TextBlock  Text="Data Ricerca" Width="70" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></TextBlock> 
                <telerikInput:RadDatePicker  x:Name="dpData" IsTodayHighlighted="True" Height="22" Margin="5,0,0,0"></telerikInput:RadDatePicker> 
 
                <TextBlock  Text="Giorni" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" ></TextBlock
                <telerikInput:RadMaskedTextBox Width="40" Mask="###" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" x:Name="tbGiorni" Value="0" /> 
 
                <TextBlock  Text="Scarto" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></TextBlock> 
                <telerikInput:RadMaskedTextBox Mask="###" Margin="5,0,0,0" VerticalAlignment="Center" x:Name="tbScarto" Value="0" /> 
 
                <Button x:Name="btnSearch"  Click="btnSearch_Click"  Content="Ricerca" FontSize="10" Height="22" Margin="5,0,0,0" ></Button
            </StackPanel> 
        </Grid> 
        <ScrollViewer x:Name="scViewer" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden" Margin="0,0,0,10" HorizontalAlignment="Left"
            <StackPanel VerticalAlignment="Top" > 
                <telerikGridView:RadGridView AutoGenerateColumns="False" DataLoadMode="Synchronous"  x:Name="gvInquiry" DataContext="{x:Null}" FontSize="9" ColumnsWidthMode="Fill" ShowGroupPanel="False" ScrollMode="Deferred" GroupHeaderTemplate="{StaticResource ClickableHeaderTemplate}" RowLoaded="gvInquiry_RowLoaded"   > 
                    <telerikGridView:RadGridView.GroupDescriptors> 
                        <data:GroupDescriptor Member="FilialeDescr" SortDirection="Ascending"
                            <data:GroupDescriptor.AggregateFunctions> 
                                <data:SumFunction Caption="NDG:" SourceField="DistinctNDGCount"></data:SumFunction> 
                            </data:GroupDescriptor.AggregateFunctions> 
                        </data:GroupDescriptor> 
                        <data:GroupDescriptor Member="RMDescr" SortDirection="Ascending"
                            <data:GroupDescriptor.AggregateFunctions> 
                                <data:SumFunction Caption="NDG:" SourceField="DistinctNDGCount"></data:SumFunction> 
                            </data:GroupDescriptor.AggregateFunctions> 
                        </data:GroupDescriptor> 
                        <data:GroupDescriptor x:Name="test" Member="NDGCLiente" SortDirection="Ascending"
                            <data:GroupDescriptor.AggregateFunctions> 
                                <data:CountFunction Caption="Disallineamenti:"></data:CountFunction> 
                            </data:GroupDescriptor.AggregateFunctions> 
                        </data:GroupDescriptor> 
                    </telerikGridView:RadGridView.GroupDescriptors> 
                    <telerikGridView:RadGridView.Columns> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="IDFiliale" DataMemberBinding="{Binding IDFiliale}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="FilialeDescr" DataMemberBinding="{Binding FilialeDescr}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="IDRM" DataMemberBinding="{Binding IDRM}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="RMDescrizione" DataMemberBinding="{Binding RMDescr}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="IDNDG" DataMemberBinding="{Binding IDNDG}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="Cliente" DataMemberBinding="{Binding Cliente}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn x:Name="Causa" Header="Causa" DataMemberBinding="{Binding Tipo}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn x:Name="CausaDescr" Header="Causa Descr" DataMemberBinding="{Binding Tipo2}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn x:Name="Limite" Header="Limite" TextAlignment="Right"  DataMemberBinding="{Binding Limite}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn x:Name="Valore" Header="Valore" TextAlignment="Right" DataMemberBinding="{Binding Valore}" ColumnWidthChanged="Valore_ColumnWidthChanged"    DataFormatString="{}{0:#,##0.0000}" ></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn IsVisible="False" x:Name="Scarto" DataMemberBinding="{Binding Scarto}"></telerikGridView:GridViewDataColumn> 
                        <telerikGridView:GridViewDataColumn x:Name="NumGiorni" Header="Num. Giorni" TextAlignment="Right" DataMemberBinding="{Binding NumGiorni}"></telerikGridView:GridViewDataColumn> 
                    </telerikGridView:RadGridView.Columns> 
                </telerikGridView:RadGridView> 
            </StackPanel> 
        </ScrollViewer> 
        <telerik:RadProgressBar Grid.Row="1" x:Name="pb" Width="260" Height="30" Minimum="0" Maximum="1000" Margin="0,0,0,30" IsIndeterminate="True" Visibility="Collapsed" /> 
    </Grid> 
</UserControl> 
 

And my GroupHeader Xaml

<UserControl x:Class="IFWebLight.Disallineamenti.Inquiry.GroupHeader" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    Width="Auto" Height="20" 
    xmlns:IF="clr-namespace:IFWebLight.Disallineamenti"
    <UserControl.Resources> 
         
    </UserControl.Resources> 
    <StackPanel Orientation="Horizontal" Loaded="StackPanel_Loaded"
        <ContentPresenter  x:Name="normalContent" Content="{Binding Header}"></ContentPresenter> 
        <HyperlinkButton x:Name="hyperLinkContent" Content="{Binding Header}" Visibility="Collapsed" Click="hyperLinkRapporto_Click_1"></HyperlinkButton> 
    </StackPanel> 
</UserControl> 

It's quite a bit urgent!
Thanks

Paolo


6 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 14 Dec 2009, 04:11 PM
Hi Paolo,

I will prepare a working example for you . However I will need to know a bit more.
Can you please let men know what do you mean by "description that is taken form a column in the grid".
The column has many cells , as well as a header cell. Where do you want to take the value from ?
Maybe from the first in that column in the relevant group ? 
Or may be the name of the column ( the header text ) ?

Both are possible .. just let me know what exactly is the requirement .

All the best,
Pavel Pavlov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michele
Top achievements
Rank 2
answered on 15 Dec 2009, 07:30 AM
Hello Pavel,
consider a structure as

Name [string]
BirthDate [DateTime]
Money [Float]
Country [string]
Division [string]

es

Paolo 24/04/1980 50.000€ Division1
Fabio 01/05/1986 20.000€ Division2
Carla 23/02/1980 50.000€ Division1

Consider a grouping on the name
so I should have 3 header Paolo,Fabio, Carla I wish to show after the grouping name a description that's division1, division2.... I tried using a custom aggregator (and I tought I take the value of field Division) but it doesn't work...

Thanks

Paolo



0
Pavel Pavlov
Telerik team
answered on 16 Dec 2009, 03:19 PM
Hi Paolo,

I hope you will find the attached example helpful. 


All the best,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michele
Top achievements
Rank 2
answered on 21 Dec 2009, 09:29 AM
Hello Pavel,
thanks for you reply and excuse me for my delay but I got flu...
I've tested it and in you example this works fine..
but you've not considered the case I need to use (and I do ) an aggregator... in that case the aggregators are inserted last...
try yourself withe this constructor

public MainPage()  
        {  
            InitializeComponent();  
            this.RadGridView1.ItemsSource = GetListOfPersons();  
            //this.RadGridView1.GroupDescriptors.Add(new GroupDescriptor(){ Member = "Name" });  
            GroupDescriptor gd1 = new GroupDescriptor() { Member = "Name" };  
            gd1.AggregateFunctions.Add(new SumFunction { Caption = "Sum:"SourceField = "Money" });  
            this.RadGridView1.GroupDescriptors.Add(gd1);  
 
            AggregateFunctionsGroup g;  
        } 

You'll see that the aggregator are inserted after the listbox

Thanks
Paolo
0
Michele
Top achievements
Rank 2
answered on 23 Dec 2009, 09:45 AM
Hello Pavel,
can you please give me a feedback on this?
Thanks

Bests
Paolo
0
Tsvyatko
Telerik team
answered on 28 Dec 2009, 08:17 AM
Hi Paolo,

You can control the appearance of the group header by customizing GroupRowStyle. I have modified the attached example to display the aggregator results before the additional information. Using this style you can further customize its appearance to fit your needs.

If you have any more questions do not hesitate to contact us.

All the best,
Tsvyatko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Michele
Top achievements
Rank 2
Answers by
Pavel Pavlov
Telerik team
Michele
Top achievements
Rank 2
Tsvyatko
Telerik team
Share this question
or