Hi.
In my grid I've got some columns with double values. Some of the values might be null values or Double.NaN resp.
However, in a summary row I need value counts, average and standard deviation of the values - excluding the null values!
How can I customize the grid aggregate functions to achieve this?
I experimented with GridViewSummaryItem.AggregateExpression a bit, but I don't know how to formulate an If-Condition to skip the null value row.
My code so far looks like this:
Dim avg As New GridViewSummaryRowItem()
Dim count As New GridViewSummaryRowItem()
Dim stdev As New GridViewSummaryRowItem()
For col As Integer = 2 To table.Columns.Count - 1
Dim row_cnt As New GridViewSummaryItem()
row_cnt.Name = table.Columns(col).ColumnName
row_cnt.Aggregate = GridAggregateFunction.Count
row_cnt.FormatString = "# {0}"
count.Add(row_cnt)
Dim row_avg As New GridViewSummaryItem()
row_avg.Name = table.Columns(col).ColumnName
row_avg.Aggregate = GridAggregateFunction.Avg
row_avg.FormatString = "Ø {0:F4}"
avg.Add(row_avg)
Dim row_stdev As New GridViewSummaryItem()
row_stdev.Name = table.Columns(col).ColumnName
row_stdev.Aggregate = GridAggregateFunction.StDev
row_stdev.FormatString = "σ {0:F4}"
stdev.Add(row_stdev)
Next
grd_data_.SummaryRowsBottom.Add(count)
grd_data_.SummaryRowsBottom.Add(avg)
grd_data_.SummaryRowsBottom.Add(stdev)