Class Dialog
Represents the Dialog UI element.
Implements
Inherited Members
Namespace: Syncfusion.JavaScript.Web
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class Dialog : CommonControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
Dialog()
Declaration
public Dialog()
Properties
ActionButtons
Adds action buttons like close, minimize, pin, maximize in the dialog header.
Declaration
public List<string> ActionButtons { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
AjaxSettings
Specifies AjaxSettings properties.
Declaration
[JsonProperty("ajaxSettings")]
public jQueryAjaxOptions AjaxSettings { get; set; }
Property Value
Type | Description |
---|---|
jQueryAjaxOptions |
AllowDraggable
Enables or disables draggable.
Declaration
public bool AllowDraggable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowKeyboardNavigation
Enables or disables keyboard interaction.
Declaration
public bool AllowKeyboardNavigation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Animation
Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog.In order to customize animation effects, you need to set “enableAnimation” as true.
Declaration
[JsonProperty("animation")]
public Animation Animation { get; }
Property Value
Type | Description |
---|---|
Animation |
BackgroundScroll
To Enable/Disable the Modal Dialog background scroller.
Declaration
public bool BackgroundScroll { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ClientSideOnActionButtonClick
Fires after Dialog custom action button is click.
Declaration
public string ClientSideOnActionButtonClick { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnAjaxError
Fires after an AJAX content loading getting error.
Declaration
public string ClientSideOnAjaxError { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnAjaxSuccess
Fires when AJAX content is loaded successfully.
Declaration
public string ClientSideOnAjaxSuccess { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnBeforeClose
Fires before the Dialog control is closed.
Declaration
public string ClientSideOnBeforeClose { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnBeforeOpen
Fires before the Dialog control is opened.
Declaration
public string ClientSideOnBeforeOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnClose
Fires after the Dialog control is closed.
Declaration
public string ClientSideOnClose { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnCollapse
Fires when the dialog content is collapsed.
Declaration
public string ClientSideOnCollapse { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnContentLoad
Fires after the dialog content is loaded in DOM.
Declaration
public string ClientSideOnContentLoad { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnCreate
Fires after the Dialog is created successfully.
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnDestroy
Fires after dialog control destroyed successfully.
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnDrag
Fires when the Dialog control is dragged.
Declaration
public string ClientSideOnDrag { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnDragStart
Fires when the Dialog dragging starts.
Declaration
public string ClientSideOnDragStart { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnDragStop
Fires after the Dialog dragging stops.
Declaration
public string ClientSideOnDragStop { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnExpand
Fires when the dialog content is expanded.
Declaration
public string ClientSideOnExpand { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnOpen
Fires after the Dialog control is opened.
Declaration
public string ClientSideOnOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnResize
Fires while the dialog is resized.
Declaration
public string ClientSideOnResize { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnResizeStart
Fires when the user starts resizing the dialog.
Declaration
public string ClientSideOnResizeStart { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClientSideOnResizeStop
Fires when the user stops resizing the dialog.
Declaration
public string ClientSideOnResizeStop { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CloseIconTooltip
Sets the tooltip for close button.
Declaration
public string CloseIconTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CloseOnEscape
Allows the Dialog window to be closed by pressing the Esc key.
Declaration
public bool CloseOnEscape { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Containment
Constrains dragging to within the bounds of the specified element or region
Declaration
public string Containment { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Content
Sets the content for the Dialog widget dynamically.
Declaration
public string Content { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ContentType
Loads the dialog content at run time such as AJAX, images and iframe.
Declaration
public string ContentType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ContentUrl
The URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’.
Declaration
public string ContentUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CssClass
The root class for the Dialog widget to customize the existing theme.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DialogContent
Define the content for dialog
Declaration
public HtmlGenericControl DialogContent { get; set; }
Property Value
Type | Description |
---|---|
System.Web.UI.HtmlControls.HtmlGenericControl |
EnableAnimation
Specifies whether to Enable or disables animation when the dialog is opened or closed.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Enabled
Specifies whether to Enable or disable the Dialog widget.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableModal
Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is closed.
Declaration
public bool EnableModal { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnablePersistence
Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableResize
Allows the dialog to be resized. The dialog cannot be resized less than the minimum height/width values and greater than the maximum height and width.
Declaration
public bool EnableResize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableRTL
Displays dialog content from right to left when set to true.
Declaration
public bool EnableRTL { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FaviconCSS
The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true.
Declaration
public string FaviconCSS { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FooterTemplateId
Places the content in footer container.
Declaration
public string FooterTemplateId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Height
Sets the height for the Dialog control.it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsResponsive
Enable or disables responsive behavior.
Declaration
public bool IsResponsive { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Locale
The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MaxHeight
Sets the maximum height for the Dialog control. it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”.
Declaration
public string MaxHeight { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MaxWidth
Sets the maximum width for the Dialog control.it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px”.
Declaration
public string MaxWidth { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MinHeight
Sets the minimum height for the Dialog control.
Declaration
public string MinHeight { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MinWidth
Sets the minimum width for the Dialog control.
Declaration
public string MinWidth { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Model
Define the DialogProperties Model Class
Declaration
public DialogProperties Model { get; set; }
Property Value
Type | Description |
---|---|
DialogProperties |
Position
Displays the Dialog widget at the given X and Y position.
Declaration
[JsonProperty("position")]
public Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position |
ShowFooter
To Show/hide the Dialog footer element.
Declaration
public bool ShowFooter { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowHeader
Shows or hides the dialog header.
Declaration
public bool ShowHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowOnInit
The Dialog widget can be opened by default i.e. on initialization, when it is set to true.
Declaration
public bool ShowOnInit { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowRoundedCorner
Enables or disables the rounder corner.
Declaration
public bool ShowRoundedCorner { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Target
The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container.
Declaration
public string Target { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Title
Provides title text for the Dialog control.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Tooltip
Add or configure the tooltip text for actionButtons in the dialog header.
Declaration
[JsonProperty("tooltip")]
public DialogTooltip Tooltip { get; set; }
Property Value
Type | Description |
---|---|
DialogTooltip |
Width
Sets the width of the Dialog control.It accepts both string and integer values.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ZIndex
Sets the Z-index value of the Dialog control.
Declaration
public int ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
CreateChildControls()
Create the child controls
Declaration
protected override void CreateChildControls()
DependentScripts()
Get the dependent script for Dialog control
Declaration
public List<string> DependentScripts()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
GetDependentFiles()
Get the dependent files for Dialog control
Declaration
public override List<string> GetDependentFiles()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
Overrides
LoadViewState(Object)
Restores view-state information from a previous page request.
Declaration
protected override void LoadViewState(object state)
Parameters
Type | Name | Description |
---|---|---|
System.Object | state |
Overrides
OnPreRender(EventArgs)
Modifying server controls before sending them to the client.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
PostBackEventHandler(String, Dictionary<String, Object>)
Maintaining viewstate model values on post back
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
Type | Name | Description |
---|---|---|
System.String | EventName | |
System.Collections.Generic.Dictionary<System.String, System.Object> | args |
Overrides
Render()
Render this instance
Declaration
public string Render()
Returns
Type | Description |
---|---|
System.String |
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer |
Overrides
Events
Close
Triggered when the dialog is closed.
Declaration
public event Dialog.DialogCloseEventHandler Close
Event Type
Type | Description |
---|---|
Dialog.DialogCloseEventHandler |