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.

Change dialog options

Thread ID:

Created:

Updated:

Platform:

Replies:

117797 Dec 16,2014 03:10 AM Dec 19,2014 01:30 AM JavaScript 6
loading
Tags: ejDialog
Walter Maranini
Asked On December 16, 2014 03:10 AM

How to change width, height and title of  the dialog widget?

I have tried this, but it does not work.


$popup.data('ejDialog').option({
width: 800,
height: 600,
title: 'title'
});


Thanks
Stefano Enrico

Balamurugan P [Syncfusion]
Replied On December 16, 2014 07:13 AM

Hi Stefano,

Thanks for using Syncfusion Products.

You can achieve your requirement using below code snippet. Here we need to create the object for dialog control then using this object we can access option method of dialog control.

Code snippet [JavaScript]:

 // Here “basicDialog” is an id of dialog control

 

  var dialogObj = $('#basicDialog').data("ejDialog");

  dialogObj.option( {width:550, title:"Title Changed", height:200});

 

 

Please let us know if you have any queries.

Regards,

Balamurugan

 


Walter Maranini
Replied On December 16, 2014 08:13 AM

Thanks Balamurugan for the quick response.
I found the problem :
when I create the dialog, I not define those properties and then I can not change them

Thanks
Stefano Enrico

Balamurugan P [Syncfusion]
Replied On December 17, 2014 07:37 AM

Hi Stefano,

Thanks for your update. We have provided support to access all the properties (which has the necessity to be accessed at run time) dynamically. To set the value for a property at run time. Please refer below syntax

Method 1:  General syntax for setting properties directly

Here we can set properties in runtime without creating object

$("jquery-selector").<ej-plugin-name>("option", "propertyName", "value");

                                (Or)

$("jquery-selector").<ej-plugin-name>("model.propertyName", "value");

 

Example:

$('#basicDialog').ejDialog("option", {width:550, title:"Title Changed", height:200})

 

Method 2: General Syntax for creating object for a component

You can also access the properties, using the object created for the component.  After that, we can set properties in runtime using “option” method.

$("jquery-selector").<ej-plugin-name>("instance”);

                                   (Or)

$("jquery-selector").data(“ej-plugin-name”);

 

Example:

   var dialogObj = $('#basicDialog').data("ejDialog");

  dialogObj.option( {width:550, title:"Title Changed", height:200});   

 

Similarly, we can set and get the values of properties in all components. You can find the list of properties supported in each components from the following class reference link for JavaScript.

http://help.syncfusion.com/cr/js

To know about the basics of Essential JS components, you can refer the following blog. Following links will be helpful to you.

http://www.syncfusion.com/blogs/post/Introduction-to-Essential-JavaScript.aspx

http://help.syncfusion.com/web

Please let us know if you have any queries.

Regards,

Balamurugan

 

 

 


Stefano Enrico
Replied On December 18, 2014 09:53 AM

Thanks Balamurugan
Perfect
Stefano

Stefano Enrico
Replied On December 18, 2014 10:19 AM

Only title property cannot be modified if it was previously created.
Probably because in the dialog it lacks the html code

<div id="popup_DLLBC_VB_SUBVIDEATA_8B_title" class="e-titlebar e-header e-draggable e-js" tabindex="">
<div class="e-dialog-icon" title="close"><span class="e-icon e-close" role="presentation"></span></div>
<div class="e-dialog-icon"><span class="e-icon e-unpin" role="presentation"></span></div>
</div>

Balamurugan P [Syncfusion]
Replied On December 19, 2014 01:30 AM

Hi Stefano,

Sorry for the Inconvenience caused.

Query 1: title property cannot be modified in runtime

We are able to reproduce the reported issue in 12.3.0.38 version. We have fixed this issue internally and it will be available in our upcoming volume release which, is expected to be rolled out at the end of this week.

This is a known issue in our end in the version 12.3.0.38. We apologize for not mentioning about this in our previous update itself.

Please let us know if you have any queries.

Regards,

Balamurugan


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.

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.

;