Ajax load page with syncfusion control to replace local current page

This is the code I wrote
The data return value is a partial page with a syncfusion control, and I want to replace part of the html of the current page. However, this data does not parse the value returned to the page.
data: 
There is no solution to similar problems

Thanks,
Linsee




4 Replies

LI linsee July 2, 2018 07:45 AM UTC

This is my partial view page code



TS Thavasianand Sankaranarayanan Syncfusion Team July 2, 2018 12:16 PM UTC

Hi Linsee, 

Thanks for contacting Syncfusion support. 

As per the given detail we suspect that the partial view Grid is not rendered in your sample. This may because of not defining the Html.EJ().ScriptManager() in the partial view page. By default, Html.EJ().ScriptManager() placed in the layout which will referred for all view pages except the partial view pages. Because Html.EJ().ScriptManager() which is in layout page is not initiate for control rendering in partial views hence every partial views should have their own ScriptManager. So, we suggest you to add below line in your partial view pages. 


@(Html.EJ().Grid<SampleApp.Models.OrdersView>("SelectedGrid") 
         
          ---- 
 
       .Columns(col => 
        { 
             
            ----- 
 
       }) 
) 
 
 
@Html.EJ().ScriptManager() 


We have already discuss about the partial view page rendering in the following documentation links. 


If we misunderstood your query then please get back to us. 

Regards, 
Thavasianand S. 



LI linsee July 3, 2018 01:55 AM UTC

Hi Thavasianand S,

Thanks for your guidance, Does the ASP.NET Core partial view page also need to add (@Html.EJ().ScriptManager()) this line of code?

Thanks
linsee


TS Thavasianand Sankaranarayanan Syncfusion Team July 3, 2018 12:17 PM UTC

Hi Linsee, 
 
Query: Does the ASP.NET Core partial view page also need to add (@Html.EJ().ScriptManager()) this line of code? 
 
Yes, we need to add ScriptManager in the partial view pages in ASP.NET Core platforms also. But we suggest you add the ScriptManager as like in the below code example. 
 
 
<div> 
    <ej-grid id="Grid" datasource="ViewBag.datasource"> 
        <e-columns> 
             
             ------ 
 
        </e-columns> 
    </ej-grid> 
 
</div>  
<ej-script-manager></ej-script-manager> 
 
 
Regards, 
Thavasianand S. 


Loader.
Up arrow icon