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. Image for the cookie policy date
close icon

TypeError: Failed to execute 'replaceChild' on 'Node': parameter 1 is not of type 'Node'.

Hello, i have following uncaught TypeError: Failed to execute 'replaceChild' on 'Node': parameter 1 is not of type 'Node' and i don't know why.

I'm using typescript and have following code 

this.clientsManager = new ej.DataManager({ url: "http://localhost:63599/odata/Clients/" });
this.clientsManager.adaptor = new ej.ODataV4Adaptor();
            
this.columns = [
{
     field: "Email", headerText: "Email", width: 75
  }, {
     field: "Id", headerText: "Id", width: 75
   }
];

and initialize my grid with following html

<div id="clients-grid"
     ej-grid
     e-datasource="vm.clientsManager"
     e-columns="vm.columns" >
</div>

the server response from http://localhost:63599/odata/Clients/?$inlinecount=allpages json like this

{
  "odata.metadata":"http://localhost:63599/odata/$metadata#Clients","odata.count":"2","value":[
    {
      "VatId":"fsadfsda","ClientNumber":"1","Email":"pavloblafs@tafd.com","Phone":"546544","Fax":"fax","Website":"websiete","StreetAddress":"fad","MailingAddress":"pavlofjsd@hotmail.com","LegalFormText":"legal from","ParentCompanysText":"ParentCompany","CountryText":"UA","ResponsibleManagingDirector1Text":"fsdfsda","Name":"Prfsd a","NameAffix":"PL","ShortName":"fsdf","InactiveSince":"2015-09-08T09:25:27.9257743+02:00","Comment":"Comment","Bcgvpcco":"hm","Bcgvpother":"xz","PracticeArea1Share":1,"PracticeArea2Share":1,"Id":"1"
    },{
      "VatId":"fsadfsda","ClientNumber":"1","Email":"pavloblafs@tafd.com","Phone":"546544","Fax":"fax","Website":"websiete","StreetAddress":"fad","MailingAddress":"pavlofjsd@hotmail.com","LegalFormText":"legal from","ParentCompanysText":"ParentCompany","CountryText":"UA","ResponsibleManagingDirector1Text":"fsdfsda","Name":"Pfsdf lia","NameAffix":"PL","ShortName":"fsdf","InactiveSince":"2015-09-08T09:25:27.9267746+02:00","Comment":"Comment","Bcgvpcco":"hm","Bcgvpother":"xz","PracticeArea1Share":1,"PracticeArea2Share":1,"Id":"2"
    }
  ]
}

Can you help me, and say what i'm doing wrong?

10 Replies

SA Saravanan Arunachalam Syncfusion Team September 9, 2015 10:15 AM UTC

Hi Desfero,

We have analyzed the reported query and noticed that you have asked the same query in forum #117993. We have provided the response for your query in that forum. Hence, please refer to the forum #117993 for better follow up.

Regards,

Saravanan.A



DE desfero September 10, 2015 09:15 PM UTC

Hello, in #117993  i ask if Essential JS have oData v4 support, now i'm using oData v4, but i have TypeError: Failed to execute 'replaceChild' on 'Node': parameter 1 is not of type 'Node' and i don't know why. My backend return good oData v4 response, even when i try using oData v3 i have the same error.


DE desfero September 11, 2015 07:23 AM UTC

It's realy look like a bug. I was try to use your code as an example. And use following code 

$("#clients-grid").ejGrid({
                // the datasource "window.gridData" is referred from jsondata.min.js
                dataSource: window.dataGrid,
                allowPaging: true,
                columns: [
                    { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75 },
                    { field: "CustomerID", headerText: "Customer ID", width: 80 },
                    { field: "EmployeeID", headerText: "Employee ID", width: 75 },
                    { field: "Freight", headerText: "Freight", width: 75, format: "{0:C}" },
                    { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}" },
                    { field: "ShipCity", headerText: "Ship City", width: 110 }
                ]
            });

and also have error: TypeError: Failed to execute 'replaceChild' on 'Node': parameter 1 is not of type 'Node'. With stack trace 

    at TypeError (native)
    at Object.t.widget.sendDataRenderingRequest (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:1907541)
    at Object.t.widget._renderGridContent (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:1894417)
    at Object.t.widget.render (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:1885387)
    at Object.t.widget._initGridRender (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:1879191)
    at Object.t.widget._checkDataBinding (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:1861691)
    at Object.t.widget._init (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:1857980)
    at Object.<anonymous> (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:16500)
    at t.widget.n.fn.(anonymous function) [as ejGrid] (http://localhost:63599/Content/_components/syncfusion/js/web/ej.web.all.min.js:10:17586)
    at new ClientsDirectiveController (http://localhost:63599/Content/_components/app/app.js:505:36) <div ui-define="central" class="ng-scope ng-cloak ng-isolate-scope">


AS Alan Sangeeth S Syncfusion Team September 11, 2015 09:14 AM UTC

Hi Desfero,

As informed in forum #117993, ODataV4Adaptor was not included in Syncfusion TypeScript “ej.widgets.all.d.ts”. If you are using the TypeScript and try to set “ODataV4Adaptor” to DataManager it would return “undefined” and DataManager would take default adaptor “ODataAdaptor

From Server post and response snippets you shared, we found that you are using OData v3 service in your back-end, as the OData V4 does not accept query “$inlinecount=allpages”. Please refer the following link

http://stackoverflow.com/questions/31342996/odata-iqueryable-count-or-inline-count-current-rules

So in your sample the adaptor would be set to “ODataApaptor” and your service may be in OData v3.

Also our Essential Studio 2015 Volume 2 Service Pack 2 Release V 13.2.0.39  is rolled out and available for download under the following link:                          

http://www.syncfusion.com/forums/120208/essential-studio-2015-volume-2-service-pack-2-release-v13-2-0-39-available-for-download

The fix for the issue “ODataV4Adaptor not included in TypeScript” is included in above link.

We have created the sample, in latest version 13.2.0.39 with ODataV4Adaptor in TypeScript, that can be downloadable from following link.

http://www.syncfusion.com/downloads/support/forum/120176/ze/EJGrid1897649853

We have also created a simple sample in JSPlayground and please find the link below

http://jsplayground.syncfusion.com/qbm5w2fy

Also please refer the following documentation for details regarding the dependencies of Syncfusion Controls

http://help.syncfusion.com/js/dependencies

If you still face issue, then please send us the below information so that we could sort out the cause of the issue and provide you a response as early as possible.
  • Essential Studio Product Version,
  • If possible, please replicate the issue in the above sample and send us back

Regards,
Alan Sangeeth S


DE desfero September 11, 2015 11:39 AM UTC

Hey, I found what the problem was. I have special character in my id (<div id="clients-grid"). 



SA Saravanan Arunachalam Syncfusion Team September 14, 2015 10:46 AM UTC

Hi Desfero,
Thanks for your update.
We are happy to hear that your issue has been resolved.
Please get back us if you need any further assistance. We will be happy to assist you.
Regards,
Saravanan.



SI Sandeep Ingale December 12, 2017 07:24 PM UTC

Desfero is right. special character such as dash ( - ) in div id does fail in ejGrid. Saravanan Arunachalam and Alan Sangeeth S this is a bug. I am saying this is a bug because in ejChart the special characters are allowed without any problem. ejChart and ejGrid both should behave in a same way i believe. 


VA Venkatesh Ayothi Raman Syncfusion Team December 13, 2017 12:13 PM UTC

Hi Sandeep, 

As you have mentioned, when we define the id name with hypen(-) symbols (“client-chart”) in ejChart control then its works fine but grid doesn’t. Because, Grid should need a JSrender script file for rendering the Grid. Please refer to the following Help documentation for grid dependency, 
We have already created a knowledge base documentation for this. Please refer to the following KB for more information, 

But chat control doesn’t need a jsRender script file for rendering. Please refer to the following Help documentation for more information, 

This is the reason why chart control works and Grid control doesn’t.  


Regards, 
Venkatesh Ayothiraman. 



AR Ambar Roy March 1, 2018 03:10 PM UTC

Hello, Please Provide me a free licence


ST SaBrena Toler Syncfusion Team March 2, 2018 02:02 PM UTC

Hello Ambar, 
  
We thank you for your interest in our controls.  Please be advised that I have sent you a license key via a separate email. 
Please let me know if you have any questions. 
Best,
SaBrena 
  
SaBrena Wallace | Director of Training 
2501 Aerial Center Pkwy, Suite 200 | Morrisville, NC 27560 | USA 
+1 919.481.2330| Fax: +1 919.573.0306 
Simplify your software licensing with one low annual fee. Learn more 


Loader.
Up arrow icon