Sporadic ejsInterop throwError undefined on Load for EjsGrid

I use the exact same layout on several different pages with different POCOs (Like categories, services, service levels, etc.) and they all work fine, but for some reason occasionally when navigating to a grid page for service levels (only service levels, not services, categories, or anything else), i get the error in the attachment below. It causes the Spinner to show up and block input, but it never goes away. I've checked the datasource and none of the data is malformed, and I've removed nearly every column to make sure it isn't an issue with a data type. The error is inconsistent as to when it happens, as well as to which service levels it happens on. We're using a view model that we populate with the service levels. Here's a snippet of the grid below:

```
@if (ServiceLevelsVM != null && ServiceLevelsVM.ServiceLevels != null)
    {
        <div class="row mt-2">
            <div class="col">
                <EjsGrid DataSource="@ServiceLevelsVM.ServiceLevels" TValue="ServiceLevelObject">
                    <GridPageSettings PageSize="5"></GridPageSettings>
                    <GridColumns>
                        <GridColumn Field="Id" IsPrimaryKey="true" ShowInColumnChooser="false" Visible="false"></GridColumn>
                        <GridColumn Field="ServiceLevelCode" HeaderText="Service Level Code" Type="ColumnType.String"></GridColumn>
                        <GridColumn Field="RegularPrice" HeaderText="Regular Price" Format="C2"></GridColumn>
                        <GridColumn Field="ServiceAgreementPrice" HeaderText="Service Agreement Price" Format="C2"></GridColumn>
                        <GridColumn Field="CreatedOn" HeaderText="Created On" CustomFormat="@(new { type= "date", format= "dd/MM/yyyy" })" Type="ColumnType.Date"></GridColumn>
                        <GridColumn Field="CreatedBy" HeaderText="Created By" Type="ColumnType.String"></GridColumn>
                        <GridColumn Field="ModifiedOn" HeaderText="Modified On" CustomFormat="@(new { type= "date", format= "dd/MM/yyyy" })" Type="ColumnType.Date"></GridColumn>
                        <GridColumn Field="ModifiedBy" HeaderText="Modified By" Type="ColumnType.String"></GridColumn>
                        <GridColumn HeaderText="Options">
                            <Template>
                                <div class="row">
                                    <div class="col">
                                        @{
                                            var serviceLevel = (context as SharedData.ViewModels.ServiceLevelObject);
                                            if (serviceLevel != null)
                                            {
                                                <button class="btn btn-sm btn-danger" @onclick="(async () => await DeleteSLAsync(serviceLevel.Id))"><i class="fa fa-trash"></i></button>
                                                <a rel='nofollow' href="/services/servicelevels/@serviceid/edit/@serviceLevel.Id" class="btn btn-sm btn-info"><i class="fa fa-pencil"></i></a>
                                            }
                                        }
                                    </div>
                                </div>
                            </Template>
                        </GridColumn>
                    </GridColumns>
                </EjsGrid>
            </div>
        </div>
    }
```

Thanks for taking the time to look this over and give some feedback!

Attachment: Annotation_20200228_104104_98942e.zip

1 Reply

RS Renjith Singh Rajendran Syncfusion Team March 2, 2020 12:06 PM UTC


Hi Ozzie, 

Thanks for contacting Syncfusion support. 

We need more details to further proceed on this and provide you a solution as early as possible. Kindly get back to us with the following details for better assistance. 

  1. Share the exact scenario when you are facing this issue. Are you facing this problem when navigating pages? If so, then share with us the exact scenario.
  2. And also, please try removing the template column in Grid. And share the details regarding if you are facing this problem when having template column or not.
  3. If possible kindly share with us the sample or simple issue reproducing sample.
  4. Share the video demo showing the problem you are facing.

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Renjith Singh Rajendran. 



Loader.
Up arrow icon