When I click Add, a new row is inserted but none of the decimal columns are showing an edit text box and I get the following browser error. All other columns are working properly.
Error:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Blazor.Grids.Internal.NumericEditCell`1[[System.Dynamic.ExpandoObject, System.Linq.Expressions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].BuildRenderTree(RenderTreeBuilder __builder)
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
Code
<SfTreeGrid @ref="treeGrid" ID="grid" DataSource="@tasks" IdMapping="Id" ParentIdMapping="ParentId" TreeColumnIndex="1" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Save", "Cancel" })" AllowExcelExport="true" AllowPdfExport="true" AllowReordering="true" AllowFiltering="true" AllowMultiSorting="true" AllowPaging="false" AllowResizing="true" AllowRowDragAndDrop="true" AllowSelection="true" AllowSorting="true" AllowTextWrap="true" AutoCheckHierarchy="true" EnableCollapseAll="true">
<TreeGridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" AllowEditOnDblClick="true" NewRowPosition="Syncfusion.Blazor.TreeGrid.RowPosition.Below" />
<Syncfusion.Blazor.TreeGrid.TreeGridEvents TValue="Models::Task" RowDataBound="OnRowDataBound" OnActionBegin="ActionBegin" OnActionComplete="ActionComplete" RowDropped="RowDropped" Expanded="Expanded" />
<TreeGridEditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" Mode="Syncfusion.Blazor.TreeGrid.EditMode.Row" />
<TreeGridColumns>
<TreeGridColumn Field=@nameof(Models::Task.Id) HeaderText="Id" IsIdentity="true" IsPrimaryKey="true" Visible="false" />
<TreeGridColumn Field=@nameof(Models::Task.Name) HeaderText="Name" />
<TreeGridColumn Field=@nameof(Models::Task.Risk) HeaderText="Risk" />
<TreeGridColumn Field=@nameof(Models::Task.Best) HeaderText="Best" Format="n2" EditorSettings="NumericParams" EditType="Syncfusion.Blazor.Grids.EditType.NumericEdit" />
<TreeGridColumn Field=@nameof(Models::Task.Worst) HeaderText="Worst" Format="n2" EditorSettings="NumericParams" EditType="Syncfusion.Blazor.Grids.EditType.NumericEdit" />
</TreeGridColumns>
</SfTreeGrid>