All,
I have a calculated column in my grid. It works pretty fine but once I change one of the correspondig fields (Qt1...Qty18) the Total column doesn't update automatically. Is it supposed to calculate only once upon loading the grid or can I somehow accomplish to calculate on the fly once a depended column changes?
Thanks,
Lars
...
<telerik:GridViewExpressionColumn
Header="Total"
UniqueName="Total"
DataFormatString="{}{0:#,##0}"
/>
...
In the constructor of the code behind I have the following lines:
Expression<Func<ForecastInputItemViewModel, double>> expression = prod => prod.Qty1 + prod.Qty2 + prod.Qty3 + prod.Qty4 + prod.Qty5 + prod.Qty6 + prod.Qty7 + prod.Qty8 + prod.Qty9 + prod.Qty10 + prod.Qty11 + prod.Qty12 + prod.Qty13 + prod.Qty14 + prod.Qty15 + prod.Qty16 + prod.Qty17 + prod.Qty18;
GridViewExpressionColumn column = ForecastGrid.Columns["Total"] as GridViewExpressionColumn;
column.Expression = expression;
I have a calculated column in my grid. It works pretty fine but once I change one of the correspondig fields (Qt1...Qty18) the Total column doesn't update automatically. Is it supposed to calculate only once upon loading the grid or can I somehow accomplish to calculate on the fly once a depended column changes?
Thanks,
Lars
...
<telerik:GridViewExpressionColumn
Header="Total"
UniqueName="Total"
DataFormatString="{}{0:#,##0}"
/>
...
In the constructor of the code behind I have the following lines:
Expression<Func<ForecastInputItemViewModel, double>> expression = prod => prod.Qty1 + prod.Qty2 + prod.Qty3 + prod.Qty4 + prod.Qty5 + prod.Qty6 + prod.Qty7 + prod.Qty8 + prod.Qty9 + prod.Qty10 + prod.Qty11 + prod.Qty12 + prod.Qty13 + prod.Qty14 + prod.Qty15 + prod.Qty16 + prod.Qty17 + prod.Qty18;
GridViewExpressionColumn column = ForecastGrid.Columns["Total"] as GridViewExpressionColumn;
column.Expression = expression;