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?
Telerik Public Issue Tracking
system and vote to affect the priority of the items
Thanks for your response, but there is an extra complication. I'm using the grid as part of a raddataform. I have already posted an issue for this on the forum... it does not work to define an expression row using code when i use the gridview on a dataform.
I did not receive a solution as such to this, but rather a workarround (using Expression="Price * Quantity")... which i have demonstrated in the initial code of the thread.
I'm wondering why this code doesn't work (even if you don't place the gridview in a raddataform)... it seems like a straight forward and very basic scenario: create a total column and then calculate a summ on that column. This should not require a dozen lines of code in codebehind!
answered on 16 May 2011, 07:36 AM
The built-in aggregate functions work with type members (through the SourceField property). If you don't specify a SourceField on the function, the RadGridView will try to infer it from the DataMemberBinding of the column.
However, as the ExpressionColumn is not a data-bound column, the RadGridView cannot infer a value for the SourceField property of the aggregate function. To remedy this, we have provided the generic AggregateFunction class, which allows you to specify a custom aggregation expression. You can see how it's used in the example attached to the forum thread Maya linked to.
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