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

Render after loading page

I cannot use @Html.EJS().ScriptManager() because my page is generated by javascript.

Simple example of SF control:

<div id="target" class="col-lg-12 control-section" style="height:100%">
    @Html.EJS().DatePicker("MyFirstDatepicker").Render()
</div>

In my Layout I should put something like this  - based on event Page.Loaded:

<script type="text/javascript">
    $(window).one("Page.Loaded", function (e, DataTableObject) {
        //alert($('#target')[0].innerHTML);
        $.fn.sfEvalScripts($('#target')[0].innerHTML);
    });
</script>

But it does not render SF control. It shows just simple input box.


1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team June 3, 2019 06:44 AM

Hi Libor, 
 
Greetings from Syncfusion support. 
 
If you want to render our Syncfsion component in MVC(Razor) syntax, we should use Script Manger in Layout page, because Script Manager will play major roll for creating and append the corresponding component into DOM element. For your reference, we have used your provided code block and ScriptManager to create the sample. Could you please check it in below location? 
 
 
To know more details about rendering our component in MVC platform, please refer the below help document. 
 
 
Please check the sample and get back to us, if you require any further assistance. 
 
Regards, 
Ashokkumar B. 


Loader.
Live Chat Icon For mobile
Up arrow icon