MongoDB | Master - Detail Data Grid | 'pvtData' of undefined

Hello,
I have a project which is based MongoDb and .net core. I want to add for the collection a mater child grid. When i append to childGrid it throws this exception:,

Cannot read property 'pvtData' of undefined
    at t.processResponse (constants.js:93)
    at e.executeLocal (constants.js:93)
    at constants.js:93

Code:

<ejs-grid id="grid" allow-paging="true" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" detailTemplate="#detailtemplate" detailDataBound="detailDataBound">
    <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Dialog" showDeleteConfirmDialog="true"></e-grid-editSettings>
    <e-data-manager url="@Url.Action("DataSource")"
                    updateUrl="@Url.Action("Update")"
                    insertUrl="@Url.Action("Insert")"
                    removeUrl="@Url.Action("Delete")"
                    adaptor="UrlAdaptor"></e-data-manager>
    <e-grid-columns>
        <e-grid-column field="Id" isPrimaryKey="true" width="130"></e-grid-column>
        <e-grid-column field="Name" width="140"></e-grid-column>
        <e-grid-column field="Active" width="130"></e-grid-column>
    </e-grid-columns>
</ejs-grid>

<script id='detailtemplate' type="text/x-template">
    <div id='childGrid'></div>
</script>

<script>
    function detailDataBound(e) {
        var data = JSON.stringify(e.data.Translation);
        var dataManager = new ej.data.DataManager({
            json: data,
            //insertUrl: "/Home/CellEditInsertDetail",
            //removeUrl: "/Home/CellEditDeleteDetail",
            adaptor: new ej.data.UrlAdaptor(), //"remoteSaveAdaptor",
            headers: [{ "Id": e.data["Id"] }]
        })

        var detail = new ej.grids.Grid({
            dataSource: dataManager,
            toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel'],
            editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, showDeleteConfirmDialog: true },
            columns: [
                { field: 'Language', headerText: 'Language', width: 110 },
                { field: 'Name', headerText: 'Name', width: 140 }
            ]
        });
        detail.appendTo(e.detailElement.querySelector('#childGrid'));
    }
</script>



2 Replies 1 reply marked as answer

AL Alp January 26, 2021 09:44 PM UTC

I solved the issue  when i changed the child dataManager's adaptor to  " new ej.data.RemoteSaveAdaptor() "

Marked as answer

RS Rajapandiyan Settu Syncfusion Team January 27, 2021 04:06 AM UTC

Hi Alp, 

Thanks for contacting Syncfusion support. 

We are glad that you have resolved the reported problem at your end. 

Regards, 
Rajapandiyan S 


Loader.
Up arrow icon