crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: .NET number values such as positive and negative infinity cannot be written as valid JSON.
System.ArgumentException: .NET number values such as positive and negative infinity cannot be written as valid JSON.
at System.Text.Json.ThrowHelper.ThrowArgumentException_ValueNotSupported () <0x686d780 + 0x0000c> in:0
at System.Text.Json.JsonWriterHelper.ValidateSingle (System.Single value) <0x686d5b0 + 0x0001c> in:0
at System.Text.Json.Utf8JsonWriter.WriteNumberValue (System.Single value) <0x686d4a8 + 0x00004> in:0
at System.Text.Json.Serialization.Converters.JsonConverterSingle.Write (System.Text.Json.Utf8JsonWriter writer, System.Single value, System.Text.Json.JsonSerializerOptions options) <0x686d2e8 + 0x0000c> in:0
at System.Text.Json.JsonPropertyInfoNotNullable`4[TClass,TDeclaredProperty,TRuntimeProperty,TConverter].OnWrite (System.Text.Json.WriteStackFrame& current, System.Text.Json.Utf8JsonWriter writer) <0x686cfb8 + 0x000f4> in:0
at System.Text.Json.JsonPropertyInfo.Write (System.Text.Json.WriteStack& state, System.Text.Json.Utf8JsonWriter writer) <0x3cb4970 + 0x0005e> in:0
at System.Text.Json.JsonSerializer.HandleObject (System.Text.Json.JsonPropertyInfo jsonPropertyInfo, System.Text.Json.JsonSerializerOptions options, System.Text.Json.Utf8JsonWriter writer, System.Text.Json.WriteStack& state) <0x3cb45f0 + 0x000ae> in:0
at System.Text.Json.JsonSerializer.WriteObject (System.Text.Json.JsonSerializerOptions options, System.Text.Json.Utf8JsonWriter writer, System.Text.Json.WriteStack& state) <0x3cb41c8 + 0x000d4> in:0
at System.Text.Json.JsonSerializer.Write (System.Text.Json.Utf8JsonWriter writer, System.Int32 originalWriterDepth, System.Int32 flushThreshold, System.Text.Json.JsonSerializerOptions options, System.Text.Json.WriteStack& state) <0x3b8a940 + 0x000ee> in:0
at System.Text.Json.JsonSerializer.WriteCore (System.Text.Json.Utf8JsonWriter writer, System.Object value, System.Type type, System.Text.Json.JsonSerializerOptions options) <0x3973898 + 0x00084> in:0
at System.Text.Json.JsonSerializer.WriteCore (System.Text.Json.PooledByteBufferWriter output, System.Object value, System.Type type, System.Text.Json.JsonSerializerOptions options) <0x3976bf0 + 0x00040> in:0
at System.Text.Json.JsonSerializer.WriteCoreString (System.Object value, System.Type type, System.Text.Json.JsonSerializerOptions options) <0x39767c8 + 0x0003e> in:0
at System.Text.Json.JsonSerializer.Serialize[TValue] (TValue value, System.Text.Json.JsonSerializerOptions options) <0x684f0e0 + 0x0000c> in:0
at Syncfusion.Blazor.Internal.SfBaseUtils.Equals[T] (T oldValue, T newValue) <0x684efd0 + 0x00088> in:0
at Syncfusion.Blazor.SfDataBoundComponent.UpdateProperty[T] (System.String propertyName, T publicValue, T privateValue, System.Object eventCallback, System.Linq.Expressions.Expression`1[TDelegate] expression) <0x650b900 + 0x000d6> in:0
at Syncfusion.Blazor.Grids.SfGrid`1[TValue].OnHybridParametersSet () <0x650e880 + 0x01510> in:0
at Syncfusion.Blazor.Grids.SfGrid`1[TValue].OnParametersSetAsync () <0x64bfe38 + 0x001e8> in:0
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x3e0f4d0 + 0x000da> in:0
@code {
[Parameter]
public ListCalculatedData { get; set; }
public ListData = new List ();
private SfGridGrid;
protected void Refresh()
{
Data.Add(new FieldAverage() { Average = float.NaN } );
Grid.Refresh();
Data = new List(Data);
Grid.Refresh(); //Will crash here because of the previous line
}
public class FieldAverage{public float Average { get; set; }}
}