We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Summary Rows and NaN values - How can I automatically exclude values

Using a GroupingGridControl I have a summary row. One of the columns is an average value and therefore when the values used to calculate the average are zero, I get the "NaN" value displayed. Whenever a NaN value is calculated I display zero by adding an event handler to: mSummaryGrid.TableControlDrawCellDisplayText and changing the text to zero. NaN values screw up the summary row cell though. So if the summary cell is and average of all values in the Column. I get Nan in the summary cell if any row contains a Nan in that column. Is there a setting to exclude NaN values from summary cell calculations so that I get a summary of the valid values? Or do I have to implement the "custom" summary type?

1 Reply

AD Administrator Syncfusion Team November 18, 2004 08:51 PM UTC

Hi Colin, I see two options. You could either do a custom summary or you do a unbound field. With a unbound field you could handle QueryValue and SaveValue yourself and store/retrieve data from the underlying data (record.GetData()) and swap out the Nan field with ''0'' or DbNull. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon