We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error in grid when refreshing

Thread ID:

Created:

Updated:

Platform:

Replies:

145525 Jun 26,2019 04:55 PM UTC Jun 27,2019 05:40 AM UTC Blazor 1
loading
Tags: Grid
Ivan Petrov
Asked On June 26, 2019 04:55 PM UTC

Hello,

When opening a page with a grid everything is alright. However, 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. I think that has something to do with re-rendering the page because when I close the modal I call the this.StateHasChanged() method.


Vignesh Natarajan [Syncfusion]
Replied On June 27, 2019 05:40 AM UTC

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"> 
        <EjsDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></EjsDataManager> 
        <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  

  1. Share the Grid rendering code and Modal details.
  2. Share the screenshot of script error with stack trace.
  3. Share your nuget version for Syncfusion Razor components.
  4. 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon