Ejs-dialog dynamic content

Good morning, I am trying to mount syncfusion components in an ejs-dialog I make the call through an ajax function and I bring the partial View to later mount it in an ejs-dialog, once the data is obtained I mount the script in the header to perform the load of the components and once the load is finished I remove the js scripts from the header.
In the first load it assembles the components correctly, but in the second it is overlapping the components. I have checked that the script is removed from the header once the partial view is loaded into the dialog.
The dialog always has the same ID, and the components the same, but they are removed from view once the dialog is closed.


3 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team August 31, 2020 11:38 AM UTC

Hi Diego, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query. We checked the reported query of loading the dynamic content for ejs-dialog, using the ajax call which works fine. We have also prepared a sample that tries to meet your requirements, of loading the dialog content using ajax call. 
 
 
Can you please check the above sample and let us know if it meets your requirements ? 
 
Regards, 
Indrajith 


Marked as answer

CF Chris Franz February 20, 2024 07:49 PM UTC

This a very helpful example. However, it uses two buttons to accomplish the action. First loading the partial view into the dialog. Then a button to display the dialog.

Can this be done with a single button click? I tried using a callback but this didn't seem to work. 

I'm a bit new to JavaScript so some additional help here would be appreciated


Regards,

Chris 



KP Kokila Poovendran Syncfusion Team February 22, 2024 09:42 AM UTC

Hi Diego,


Thank you for reaching out to us with your query.


We understand your need for a single button click event to load the dynamic content into the dialog. We've prepared a sample based on your requirement. In this sample, the content is loaded dynamically using an Ajax post when you click the button to open the dialog.


Please refer to the attached sample and the video illustration below for a better understanding.




Attachment: Dialog_partial_view1410398564_(2)_95acd707.zip

Loader.
Up arrow icon