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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dialog set enable modal dinamically not working.

Thread ID:

Created:

Updated:

Platform:

Replies:

126288 Oct 6,2016 04:09 AM UTC Oct 7,2016 11:04 AM UTC ASP.NET MVC 1
loading
Tags: Dialog
Juan Acosta
Asked On October 6, 2016 04:09 AM UTC

Hi,

I was looking the documentation for the dialog.
https://help.syncfusion.com/js/api/ejdialog#members:enablemodal

$("#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");
        data.setTitle(changeTitle);
        if(type==0)
        {
        $("#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,

Juan


Rekha J [Syncfusion]
Replied On 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("open");   
            $("#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,  
Regards,   
Rekha. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;