[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
   Reporting
  [Expand]Charting
  [Expand]Pivot Grid
   Spreadsheet
   Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Collapse]Data Editors Extensions
    Editor List
    Main Features
   [Expand]Common Concepts
    BinaryImage
   [Expand]Button
    ButtonEdit
   [Expand]Calendar
   [Expand]Captcha
    CheckBox
    CheckBoxList
   [Expand]ColorEdit
   [Expand]ComboBox
   [Expand]DateEdit
   [Expand]DropDownEdit
    Filter Control
   [Expand]GridLookup
   [Expand]HyperLink
   [Expand]Image
   [Expand]Label
   [Expand]ListBox
   [Expand]Memo
   [Expand]Progress Bar
   [Expand]RadioButton
   [Expand]RadioButtonList
   [Expand]SpinEdit
   [Expand]TextBox
   [Expand]TimeEdit
   [Expand]TokenBox
   [Expand]TrackBar
    Validation Summary
   [Expand]Strongly-Typed Editor Types
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]SpellChecker
  [Expand]Query Builder
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

ButtonEdit

ButtonEdit is a text editor that allows you to display buttons within an edit box.

Expanded Implementation Details

ButtonEdit is realized by the ButtonEditExtension class. Its instance can be accessed via the ExtensionsFactory.ButtonEdit helper method, which is used to add a ButtonEdit extension to a view. This method's parameter provides access to the ButtonEdit's settings, implemented by the ButtonEditSettings class, allowing you to fully customize the extension.

The ButtonEdit's client counterpart is represented by the ASPxClientButtonEdit object.

Expanded Declaration

ButtonEdit can be added to a view in the following manner.

View code (ASPX):

View code (Razor):

Note

The Partial View should contain only the extension's code.

The code result is demonstrated in the image below.

Expanded Main Features

  • Null Prompt Text

    The prompt text can be displayed if the editor's value is null and the editor is not focused. The prompt text disappears when the editor receives focus. You can define the prompt text via the ButtonEditSettings.Properties.NullText (ButtonEditProperties.NullText) property.

  • Mask Password Input

    You can treat the input as a password, so the characters entered into the editor are masked. To enable this functionality, set the ButtonEditSettings.Properties.Password (ButtonEditProperties.Password) property value to true.

  • Mask Input

    The ButtonEdit extension allows you to use masks during editing. See the Mask Editing topic to learn more.

  • Button Templates

    You can create a template that defines the common manner in which all editor buttons are rendered.

  • Built-in Validation

    The ButtonEdit extension allows you to perform data validation both on the client and server side. See the Built-in Validation topic to learn more.

  • Customizable Button Layout and Look-and-Feel

    Each button can display text, an image, or both. You can control the button's visibility, availability to end-users and position within the editor's text box. You can use the ButtonEditSettings.Properties.Buttons (ButtonEditPropertiesBase.Buttons) property in order to manage the button collection.

    You can customize the extension appearance using predefined built-in visual themes. See this topic to learn more: Applying Themes

  • Full-Featured Client-Side API

    The ButtonEdit provides you with a comprehensive client-side API. This API is implemented using JavaScript and is exposed via the ASPxClientButtonEdit object. The ASPxClientButtonEdit object serves as the client-side equivalent of the ButtonEdit extension.

Is this topic helpful?​​​​​​​