Resize Dialogs | RadEditor for ASP.NET AJAX Documentation
Edit this page

Resize Dialogs

Due to designer requirements, the RadEditor dialogs should be resized to a non-default dimensions. The following article explains how the size of the built-in dialogs could be easily manipulated via the DialogDefinition class.


As of the Q3 2013 release, setting a custom size for the built-in dialogs using the approach suggested in this article will not work as expected due to improvements Telerik made to dialogs in RadEditor . You can find information about this subject in the "The Autosize feature of the Built-in Dialogs is Enabled" article, in which an appropriate approach for resizing is also provided.

As shown in Example 1, the DialogDefinition class of RadEditor provides the ability to change the initial size of RadEditor dialogs in the Page_PreRenderComplete event. For example, to increase the size of the LinkManager dialog you can get a reference to it with the GetDialogDefinition method of the DialogDefinition class and then use the Width and Height properties to set the desired dimension:

Example 1: Resizing the LinkManager dialog via the DialogDefinition class.

protected override void OnInit(EventArgs e)
    this.Page.PreRenderComplete += new EventHandler(Page_PreRenderComplete);
void Page_PreRenderComplete(object sender, EventArgs e)
    Telerik.Web.UI.DialogDefinition linkManager = RadEditor1.GetDialogDefinition("LinkManager");
    linkManager.Height = Unit.Pixel(500);
    linkManager.Width = Unit.Pixel(500);
Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)
    AddHandler Me.Page.PreRenderComplete, AddressOf Page_PreRenderComplete
End Sub

Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As EventArgs)
    Dim linkManager As Telerik.Web.UI.DialogDefinition = RadEditor1.GetDialogDefinition("LinkManager")
    linkManager.Height = Unit.Pixel(500)
    linkManager.Width = Unit.Pixel(500)
End Sub

The DialogDefinition class also provides different useful RadWidow configuration settings such as Behaviors, VisibleStatusbar, VisibleTitlebar, etc.

See Also

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article