I've been working on a grid with a dynamic number of columns. One of the columns required a sum across columns with a total in a new calculated column. I implemented this and when the expressions for the miscalculation become too large (not very bit at all) it will crash iis with a stack overflow exception.
It's important to note I'm working around another bug where is one of the data values is null calculated expressions don't work.
So I was dynamically defining the expression for the calculated column like so:
When I have 10ish (or more) iterations of the above loop then I get the stack overflow exception from this:
Removing the calculation allows this to work properly.
I'm reworking my implementation to do the calculation on the database side but thought I should mention this in case anyone else runs into this problem.
Our solution is using a slightly older build: Telerik.Web.UI_2011_2_712_Dev
It's important to note I'm working around another bug where is one of the data values is null calculated expressions don't work.
So I was dynamically defining the expression for the calculated column like so:
for
(
int
i = 0; i < dataColumns.Count; i++)
{
expression += String.Format(
"({{{0}}} == null ? 0 : {{{0}}})+"
, IntFormatter.ToString(i));
}
expression = StringFormatter.Left(expression, expression.Length - 1);
ccol.Expression = expression;
When I have 10ish (or more) iterations of the above loop then I get the stack overflow exception from this:
//rebind
RadGridSearch.Rebind();
Removing the calculation allows this to work properly.
I'm reworking my implementation to do the calculation on the database side but thought I should mention this in case anyone else runs into this problem.
Our solution is using a slightly older build: Telerik.Web.UI_2011_2_712_Dev