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

Custom Aggregates in Q3 2009 sp2

2 Answers 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
jimit r
Top achievements
Rank 1
jimit r asked on 17 Mar 2010, 12:38 PM
How do i add my own aggregating function in the radgridview version Q3 2009 SP2? Or rather, is there any way to obtain the aggregated value from the normal SumFunction in the footer?

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Mar 2010, 01:08 PM
Hello jimit r,

Please check this demo for more info:
http://demos.telerik.com/wpf/?GridView/CustomAggregates

Greetings,
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.
0
Felix
Top achievements
Rank 1
answered on 21 Jun 2011, 01:45 PM

I am using the same code in the sample customAggrgates
The difference is tha I populate the Gridview after the InitializeComponent but the column discount is not bringing nothing, and the agregate result is show in the top

 

 

 

public IEnumerable<ErrorRecord> SourceErrorRecords ;

 

 

 

public class ErrorRecord

 

 

 

 

 

 

{

 

 

public ErrorRecord()

 

{

 

 

// this.status = new List<string> { "valid", "invalid" };

 

 

 

 

 

 

}

 

 

public string Error_Code { get; set; }

 

 

 

public string Error_Desc { get; set; }

 

 

 

public int Rejects { get; set; }

 

 

 

public int Percentage { get; set; }

 

 

 

public double NewPercentage { get; set; }

 

 

 

public double Discount { get; set; }

 

 

 

}

 

 

public frmGroupByErrorCodeWithOutSomeCodes()

 

{

 

 

//InitializeComponent();

 

 

 

 

 

 

InitializeComponent();

 

 

Menus newMenus2 = new Menus();

 

 

 

DataTable dd = newMenus2.StoreProc("CodeReject_GetErrorCodes withoutCodes");

 

 

 

 

//LabelNumber.Content = "Records: " + dd2.Rows.Count;

 

 

 

 

 

 

 

 

 

SourceErrorRecords = GetErrorRecords(dd);

 

 

ColumnGroupDescriptor descriptor = new ColumnGroupDescriptor();

 

 

 

 

 

 

 

 

descriptor.Column = this.radGridViewError.Columns["Discount"];

 

 

 

 

 

 

 

 

descriptor.SortDirection = ListSortDirection.Ascending;

 

 

 

 

 

 

 

 

this.radGridViewError.GroupDescriptors.Add(descriptor);

 

 

 

 

 

 

 

 

 

 

 

radGridViewError.ItemsSource = SourceErrorRecords;

 

 


Tags
General Discussions
Asked by
jimit r
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Felix
Top achievements
Rank 1
Share this question
or