Hi Sam,
This can be done by changing the DataTemplate of the StatCell and have it display "0" instead of "DIV/0" using a converter.
Here's an example:
class StatCellConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Debug.WriteLine(value);
if (value.Equals("#DIV/0#"))
return "0";
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
<DataTemplate>
<xcdg:StatRow>
<xcdg:StatRow.Cells>
<xcdg:StatCell ResultPropertyName="AverageID" FieldName="ID">
<xcdg:StatCell.ContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding ., Converter={StaticResource ResourceKey=statCellConverter}}"/>
</DataTemplate>
</xcdg:StatCell.ContentTemplate>
</xcdg:StatCell>
</xcdg:StatRow.Cells>
</xcdg:StatRow>
</DataTemplate>
Best Regards,
Michel Dahdah
Technical Support
Xceed Software inc.