How to make AggregateFunctions left align

7 posts, 0 answers
  1. diandian82
    diandian82 avatar
    13 posts
    Member since:
    Jul 2007

    Posted 17 May 2010 Link to this post

    Hi folks,

    This is one of my column definition in my RadGridView. Below the data column, there will be a footer contains the Aggregate values. But the values are not left align, there is always a space ahead of the values. How can i remove this space or make it left align?

    <telerikGridView:GridViewDataColumn Header="% Growth" FooterTextAlignment="Left" DataFormatString="{}{0:C0}" DataMemberBinding="{Binding Growth}"  IsReorderable="False" IsFilterable="False"  >
                                <telerikGridView:GridViewDataColumn.AggregateFunctions>
                                    <data:AverageFunction SourceField="Growth" ResultFormatString="{}{0:C0}" />
                                </telerikGridView:GridViewDataColumn.AggregateFunctions>
                            </telerikGridView:GridViewDataColumn>


    In addition, if the definition is as follows,
    <telerikGridView:GridViewDataColumn Header="Q1" FooterTextAlignment="Left" DataMemberBinding="{Binding Q1Name}" IsReorderable="False" IsFilterable="False" >
                                <telerikGridView:GridViewDataColumn.Footer>
                                    <TextBlock Text="Total" HorizontalAlignment="Left" ></TextBlock>
                                </telerikGridView:GridViewDataColumn.Footer>
                            </telerikGridView:GridViewDataColumn>
    the "Total" text box will be left align. This is correct.

    Help me please, thanks in advance.

    George
  2. diandian82
    diandian82 avatar
    13 posts
    Member since:
    Jul 2007

    Posted 17 May 2010 Link to this post

    Is there anybody can help me on this?
  3. DevCraft banner
  4. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 18 May 2010 Link to this post

    Hello diandian82,

    There is a small inaccuracy in the style of the default aggregate results list causing some additional padding . We are going to fix it for future releases. Meanwhile please use the following workaround.
    <telerikGridView:GridViewDataColumn   Header="% Growth" FooterTextAlignment="Left" DataFormatString="{}{0:C0}" DataMemberBinding="{Binding Growth}"  IsReorderable="False" IsFilterable="False"  >
                        <telerikGridView:GridViewDataColumn.AggregateFunctions>
                            <data:AverageFunction SourceField="Growth" ResultFormatString="{}{0:C0}" />
                        </telerikGridView:GridViewDataColumn.AggregateFunctions>
                        <telerikGridView:GridViewDataColumn.Footer>
                            <gridView:AggregateResultsList  Margin="-10,0,0,0" ItemsSource="{Binding}" />
                        </telerikGridView:GridViewDataColumn.Footer>
                    </telerikGridView:GridViewDataColumn>

    Please excuse us for the inconvenience caused.

    Kind regards,
    Pavel Pavlov
    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.
  5. diandian82
    diandian82 avatar
    13 posts
    Member since:
    Jul 2007

    Posted 18 May 2010 Link to this post

    Hi Pavel,

    Thanks for your reply.

    Your workaround doesn't work for me. I don't know why.

    <telerikGridView:GridViewDataColumn.Footer>
                                    <telerikGridView:AggregateResultsList  Margin="-10,0,0,0" ItemsSource="{Binding}" />
                                </telerikGridView:GridViewDataColumn.Footer>

    in my assembly and namespace, i can't find the class AggregateResultsList  I have added the namespace in my XAML. Are there any mistakes?

    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"

    Thanks,
    George
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 19 May 2010 Link to this post

    Hi,

    Can you post more info about your grid version?

    All the best,
    Vlad
    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.
  7. diandian82
    diandian82 avatar
    13 posts
    Member since:
    Jul 2007

    Posted 20 May 2010 Link to this post

    how can i get this kind of info?

    the product version of Telerik.Windows.Controls.GridView.dll is 2010.1.0422.1040
  8. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 21 May 2010 Link to this post

    Hello diandian82,

    Please use the attached project for reference.

    Sincerely yours,
    Pavel Pavlov
    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.
Back to Top
DevCraft banner