Hello,
I am attempting to add a count aggregate function to a radGridView programmatically. I first tried to add the following code to my MainPage method as follows:
public MainPage() |
{ |
InitializeComponent(); |
// load the grid |
this.radGridView.ItemsSource = EmployeeService.GetEmployees(); |
CountFunction f = new CountFunction(); |
f.Caption = "Count: "; |
((GridViewDataColumn)this.radGridView.Columns[0]).AggregateFunctions.Add(f); |
} |
When I rebuild my solution and test this, silverlight just clocks. When I comment out the code which adds the aggregate, rebuild and test, it works fine again.
What I am trying to do is test whether I am able to add aggregates to grids with autogenerated columns.
As an alternate test, I created a button which when clicked added the aggregate function and displayed it after running the Rebind method on the radGridView. But again my goal is to have the aggregate display when the grid is loaded.
Brice