ASP.NET HTML Editor - Custom Dialogs (coming in v2010 vol 2)

ASP.NET Team Blog
17 September 2010

Check out the new Custom Dialogs features of our ASP.NET HTML Editor, the ASPxHtmlEditor:

ASPNET_HTMLEditor_Custom_Dialogs

The upcoming ASPxHtmlEditor’s Custom Dialog feature is part of the DXperience v2010 volume 2 release.

Features

In addition to built-in dialogs available within the ASPxHtmlEditor, you can use any number of custom dialogs. To add custom dialogs to the ASPxHtmlEditor, use the CustomDialogs collection. A custom dialog is represented by an HtmlEditorCustomDialog object, which provides the following settings:

  • Caption and Name - Use these properties to specify a dialog's caption and name. The dialog's name is used for reference, as described below.
  • FormPath - Use this property to provide a path to a user control representing a dialog's form.
  • OkButtonText, OkButtonVisible, CancelButtonText, and CancelButtonVisible - These options allow you to specify the visibility and caption of two standard dialog buttons. By default, these buttons are labeled "Ok" and "Cancel". You can customize default button captions as necessary. In this demo, the Ok button's caption is changed to reflect the dialog's functionality.

You can associate a custom dialog with a toolbar item, that when clicked, invokes the dialog. To implement this, just add a ToolbarCustomDialogButton toolbar item to the ASPxHtmlEditor and assign the dialog's name to the toolbar item's Name property.

The Custom Dialogs feature provides you with a both a server and client-side API to create custom dialogs.

  • Built-in toolbar button:

    toolbar_button
    toolbar_markup

  • Easy to use CustomDialogs collection available at the ASPxHtmlEditor’s level:

    collection

  • Several client-side events that allow you to respond to end-user interactions with custom dialogs and dialog button clicks. Events include:

    • CustomDialogOpened -You can handle this event to initialize a custom dialog. 
    • CustomDialogClosing - You can handle this event to respond to closing a custom dialog (via a click on a dialog button or the header's close button). To identify a dialog and an element being clicked, use the event parameter's Name andStatus properties. To prevent default processing of closing a dialog, assign true to the event parameter's handledproperty.
    • CustomDialogClosed - You can handle this event to perform specific actions, based on the dialog button that has been clicked or any other suitable condition.
  • Built-in view for custom dialogs:
    view

  • Client-side commands:

    • CustomDialog command (ASPxClientCommandConsts.CUSTOMDIALOG_COMMAND) to show dialogs

    • CustomDialogComplete client method to close a dialog programmatically

The ASPxHtmlEditor is getting major features and updates for the DXperience v2010 volume 2.

Drop me line below with your thoughts on the versatile and powerful Custom Dialogs feature of the ASPxHtmlEditor. Thanks!

Follow MehulHarry on Twitter

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.