Control in PartialView not rendering

Hi, 

All controls correctly renders in normal views, but not inside PartialViews (loaded via Ajax calls). I've tried to add <ejs-scripts></ejs-scripts> tags at the end of the Partial, but it doesen't change the situation.
After loading the partial view in console I have this error:

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#' is not a valid selector.
    at t.appendTo (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:10:289761)
    at <anonymous>:11:21
    at DOMEval (https://localhost:xxxxx/lib/jquery/dist/jquery.js:111:12)
    at domManip (https://localhost:xxxxx/lib/jquery/dist/jquery.js:5762:8)
    at jQuery.fn.init.append (https://localhost:xxxxx/lib/jquery/dist/jquery.js:5898:10)
    at jQuery.fn.init.<anonymous> (https://localhost:xxxxx/lib/jquery/dist/jquery.js:5992:18)
    at access (https://localhost:xxxxx/lib/jquery/dist/jquery.js:3939:8)
    at jQuery.fn.init.html (https://localhost:xxxxx/lib/jquery/dist/jquery.js:5959:10)
    at Object.<anonymous> (https://localhost:xxxxx/lib/jquery/dist/jquery.js:9892:9)
    at fire (https://localhost:xxxxx/lib/jquery/dist/jquery.js:3268:31)"

many thanks in advance

3 Replies

JR John Rajaram Syncfusion Team September 21, 2018 01:04 PM UTC

Hi Juri, 
Thanks for contacting Syncfusion support. 
We have checked for the reported issues. But we are unable to reproduce the issue from our end. However, we have created a sample for Partial view (loaded via Ajax) and the same can be referred from the below link. 
Please check the sample and let us know if you have any queries. 
John R 



JU Juri October 1, 2018 02:48 PM UTC

Thank you for the code, now everything is working. 
At the end the problem was unrelated to adding controls in partial views.



JL Jude Leander Johnson Lionel Syncfusion Team October 2, 2018 05:19 PM UTC

Hi Juri, 
We are happy to hear that your requirement has been achieved. 
Please get back to us if you need further assiatnce. 
Regards, 
Jude J. 


Loader.
Up arrow icon