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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change dialog options

Thread ID:





117797 Dec 16,2014 08:10 AM UTC Dec 19,2014 06:30 AM UTC JavaScript 6
Tags: ejDialog
Walter Maranini
Asked On December 16, 2014 08:10 AM UTC

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

I have tried this, but it does not work.

width: 800,
height: 600,
title: 'title'

Stefano Enrico

Balamurugan P [Syncfusion]
Replied On December 16, 2014 12:13 PM UTC

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.




Walter Maranini
Replied On December 16, 2014 01:13 PM UTC

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

Stefano Enrico

Balamurugan P [Syncfusion]
Replied On December 17, 2014 12:37 PM UTC

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");


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



$('#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.






   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.


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



Please let us know if you have any queries.






Stefano Enrico
Replied On December 18, 2014 02:53 PM UTC

Thanks Balamurugan

Stefano Enrico
Replied On December 18, 2014 03:19 PM UTC

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>

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

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 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 We apologize for not mentioning about this in our previous update itself.

Please let us know if you have any queries.




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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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