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

Dialog set enable modal dinamically not working.


I was looking the documentation for the dialog.

$("#dialog").ejDialog({enableModal: true});
What I want is enable the model property depending some parameters.

I have a method that opens the dialog from Onclick function openDialogWithMessageHistoryVersion.

function openDialogWithMessageHistoryVersion(changeTitle, type) {
        var data = $("#GridShowDocumentHistory").ejDialog("instance");
        $("#GridShowDocumentHistory").ejDialog("open", { enableModal: false});
        else if (type == 1)
        $("#GridShowDocumentHistory").ejDialog("open", { enableModal: true });

The dialog opens fine, but the enable model property is never active.

Could you tell me what could be the issue.

Kind regards,


1 Reply

RJ Rekha J Syncfusion Team October 7, 2016 11:04 AM UTC

Hi Juan,   
Thanks for using Syncfusion products.    
Query: Dialog set enable modal dynamically not working.   
We have checked the mentioned problem. The issue is due to incorrect usage of the properties with method in our control. You have used the enableModal property with the open method “(("#GridShowDocumentHistory").ejDialog ("open", {enableModal: false}) ;”. You can’t use properties of controls and method "open" in that same line of code). Instead of it, please set the properties and method consecutively.         
For your convenience, we have provided the code snippet for achieving your requirement.   
Code Snippet:   
      if (event.data.type == 1) {               
            $("#basicDialog").ejDialog({ enableModal: true });   
For your reference, we have created a sample using Dialog control. You can get this sample from the following location,   
Please let us know if you have any queries,  

Live Chat Icon For mobile
Up arrow icon