Hi there,
we just update from 2011 Q1 to 2012 Q1. But there is a breaking change after update.
We got the following exception.
the way that I use this custom aggregate function as following
originally, the code was something like this, and this is causing exception.
then I figured it out from the exception message that I should write my code like following to make it works.
ok, so, my question is has Telerik update custom aggregate function between 2011 Q1 and 2012 Q1 releases? If no, then what cause this exception and why it works for 2011 Q1 release?
thank you for your time.
regards
Jerry
we just update from 2011 Q1 to 2012 Q1. But there is a breaking change after update.
We got the following exception.
{System.InvalidOperationException: No generic method 'BudgetHours' on type 'Datacom.CorporateSys.SL.Project.View.Functions' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.
the way that I use this custom aggregate function as following
<
telerik:GridViewDataColumn
IsReadOnly
=
"True"
DataMemberBinding
=
"{Binding CurrentMonthBudgetHour, Mode=OneWay}"
Header
=
"Budget Hours"
>
<
telerik:GridViewDataColumn.AggregateFunctions
>
<
local:BauBudgetHoursFunction
Caption
=
"Budget Hours: "
/>
</
telerik:GridViewDataColumn.AggregateFunctions
>
</
telerik:GridViewDataColumn
>
originally, the code was something like this, and this is causing exception.
namespace Datacom.CorporateSys.SL.Project.View
{
public class BudgetHoursFunction : EnumerableAggregateFunction
{
protected override string AggregateMethodName
{
get { return "BudgetHours"; }
}
protected override Type ExtensionMethodsType
{
get { return typeof(Functions); }
}
}
public static decimal? BudgetHours<
TSource
>(IEnumerable<
Task
> source)
{
return doSomething(source);
}
}
then I figured it out from the exception message that I should write my code like following to make it works.
namespace Datacom.CorporateSys.SL.Project.View
{
public class BudgetHoursFunction : EnumerableAggregateFunction
{
protected override string AggregateMethodName
{
get { return "BudgetHours"; }
}
protected override Type ExtensionMethodsType
{
get { return typeof(Functions); }
}
}
public static decimal? BudgetHours<
TSource
>(IEnumerable<
object
> source)
{
return doSomething(source);
}
}
ok, so, my question is has Telerik update custom aggregate function between 2011 Q1 and 2012 Q1 releases? If no, then what cause this exception and why it works for 2011 Q1 release?
thank you for your time.
regards
Jerry