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

[Solved] Aggregation column formatting

2 Answers 123 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.
Rama
Top achievements
Rank 1
Rama asked on 23 Feb 2011, 03:29 PM
Hi,

I'm trying to align the aggregated value to right but it looks like it's not possible. could you let me know how to achieve this?

Definition:

 <telerik:RadGridView x:Name="ClientSeriesGrid" Grid.Row="1" ShowColumnFooters="True"  ShowGroupFooters="True"
                             AutoGenerateColumns="False" IsReadOnly="True" CanUserFreezeColumns="True"
                             AlternateRowBackground="AliceBlue">
                        </telerik:RadGridView>

Column addition:

 GridViewDataColumn gridColumn = new GridViewDataColumn { Header = date, CellStyle = DataCellRight };
                gridColumn.DataMemberBinding = bin;
                gridColumn.AggregateFunctions.Add(new SumFunction() { SourceField = string.Format("DataPoints[{0}]", date), ResultFormatString = "{0:#,##;(#,##);#,##}", SourceFieldType = Type.GetType("System.Double") });
TraderSeriesGrid.Columns.Add(gridColumn);

how do I specify alignment here?
              

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 23 Feb 2011, 03:39 PM
Hi Rama,

You may set the FooterTextAlignment property of the column to "Right":

GridViewDataColumn gridColumn = new GridViewDataColumn { Header = date, CellStyle = DataCellRight };
gridColumn.DataMemberBinding = bin;        
gridColumn.AggregateFunctions.Add(new SumFunction() { SourceField = string.Format("DataPoints[{0}]", date), ResultFormatString = "{0:#,##;(#,##);#,##}", SourceFieldType = Type.GetType("System.Double") });
gridColumn.FooterTextAlignment = TextAlignment.Right;
TraderSeriesGrid.Columns.Add(gridColumn);


 

Regards,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Rama
Top achievements
Rank 1
answered on 23 Feb 2011, 03:53 PM
Thanks for the quick reply. Can you also look into my other post: http://www.telerik.com/community/forums/silverlight/sparkline/dictionary-databinding-not-working.aspx

I've demo in 2hrs and it'll be nice if I can show some chart to get support for Telerik control against DevExpress.

Thanks in advance
Tags
GridView
Asked by
Rama
Top achievements
Rank 1
Answers by
Maya
Telerik team
Rama
Top achievements
Rank 1
Share this question
or