Hi Ivan,
Thanks for contacting Syncfusion forums
Query: “if I open a modal on the same page and then close it I get the following error - Cannot read property 'ej2_instances' of null.”
From your query, we understand that you are facing issue while closing the modal. Since it is a known issue we have fixed the reported issue in our 17.1.52-beta patch release and it requires .NETCore 3.0 Preview6. For your convenience we have prepared a sample with Grid and Dialog Modal using 17.1.53-beta (latest nuget) version. We have closed and opened the dialog multiple times and we are not able to reproduce the issue.
Kindly refer the below code example and sample for your reference
<div class="col-lg-12 control-section" id="target">
<Button id="normalbtn" class="e-btn" onclick="@onClicked">Open</Button>
<EjsDialog id="dialog" @ref="dialogObj" Created="@created" target="#target" header="Resize Me!!!" width="300px" allowDragging="true" enableResize="true" showCloseIcon="true" Content="<span>This is a dialog with resizable support.</span>">
</EjsDialog>
<EjsGrid id="Grid" @ref="grid" AllowPaging="true" ActionComplete="@complete">
<GridColumns>
<GridColumn Field="OrderID" HeaderText="Employee ID" ISPrimaryKey="true" TextAlign="@Syncfusion.EJ2.RazorComponents.Grids.TextAlign.Right" Width="90"></GridColumn>
<GridColumn Field="CustomerID" HeaderText="First Name" Width="90"></GridColumn>
<GridColumn Field="EmployeeID" HeaderText="Employee ID" Width="90"></GridColumn>
<GridColumn Field="Freight" HeaderText="Freight" Width="90"></GridColumn>
</GridColumns>
</EjsGrid>
</div> |
After referring to sample, if you are still facing the issue, kindly share the following details
- Share the Grid rendering code and Modal details.
- Share the screenshot of script error with stack trace.
- Share your nuget version for Syncfusion Razor components.
- Also ensure you are using .NETCore 3.0 Preview 6.
The requested details will be helpful for us to validated the reported issue at our end and provide solution as early as possible
Regards,
Vignesh Natarajan.