| MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Types > SummaryCell > Displaying an Error Icon for Data Errors (SummaryCell) |
In the summary cell, if a number is divided by zero, or if a non-numeric value is set in the calculating formula which results in a data error in the calculated value, then you can display an error icon.

This example shows an error icon.
Imports GrapeCity.Win.MultiRow
Dim textBoxCell1 As New TextBoxCell()
textBoxCell1.Name = "textBoxCell1"
textBoxCell1.Value = 10
Dim textBoxCell2 As New TextBoxCell()
textBoxCell2.Name = "textBoxCell2"
textBoxCell2.Value = 0
Dim expression1 = New GrapeCity.Win.MultiRow.Expression()
expression1.ExpressionString = "textBoxCell1 / textBoxCell2"
Dim summaryCell1 As New SummaryCell()
summaryCell1.Name = "summaryCell1"
summaryCell1.Calculation = expression1
' Display the error icon.
summaryCell1.ShowDataErrorIcon = True
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {textBoxCell1, textBoxCell2, summaryCell1})
|
using GrapeCity.Win.MultiRow;
TextBoxCell textBoxCell1 = new TextBoxCell();
textBoxCell1.Name = "textBoxCell1";
textBoxCell1.Value = 10;
TextBoxCell textBoxCell2 = new TextBoxCell();
textBoxCell2.Name = "textBoxCell2";
textBoxCell2.Value = 0;
Expression expression1 = new GrapeCity.Win.MultiRow.Expression();
expression1.ExpressionString = "textBoxCell1 / textBoxCell2";
SummaryCell summaryCell1 = new SummaryCell();
summaryCell1.Name = "summaryCell1";
summaryCell1.Calculation = expression1;
// Display the error icon
summaryCell1.ShowDataErrorIcon = true;
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { textBoxCell1, textBoxCell2, summaryCell1 });
|