Default ButtonEdit

This example demonstrates the Bootstrap Button Edit control with default settings. The Bootstrap Button Edit control displays a text editor with one (by default) or more buttons displayed in its client region.

<dx:BootstrapButtonEdit runat="server" Text="Sample Text">
    <ClientSideEvents ButtonClick="function(s,e) { alert('The button has been clicked.'); }" />
    <Buttons>
        <dx:BootstrapEditButton />
    </Buttons>
</dx:BootstrapButtonEdit>

Buttons Collection

In this example, the Bootstrap Button Edit control displays two custom buttons - one on the left and one on the right of the editor. In the markup sample, you can see how these buttons are defined as elements of the Buttons collection property.

<dx:BootstrapButtonEdit runat="server" Text="Sample Text">
    <Buttons>
        <dx:BootstrapEditButton IconCssClass="fa fa-envelope" Position="Left" />
        <dx:BootstrapEditButton Text="Check email" />
    </Buttons>
    ...
</dx:BootstrapButtonEdit>

Clear Button

In this example, the Button Edit control displays a clear button, which will delete the current content of the editor when clicked. The clear button can be displayed in one of the following modes.

  • Always – the clear button is always visible as in this example
  • Auto - the clear button is displayed on touch devices only
  • Never - the clear button is not displayed
  • OnHover - the clear button is displayed when an editor is hovered over or focused
<dx:BootstrapButtonEdit runat="server" Text="Sample Text">
    <ClearButton DisplayMode="Always" />
    ...
</dx:BootstrapButtonEdit>

Null Text

This example illustrates how the NullText property can be used to display prompt text (watermark) in the editor's edit box. Specified text is displayed when the value of the editor is null and the editor is not focused. The prompt text disappears when the editor receives focus.

<dx:BootstrapButtonEdit runat="server" NullText="Enter Your Name">
    ...
</dx:BootstrapButtonEdit>

Mask

In this example, the Button Edit control takes advantage of the masked input feature to only accept values formatted as phone numbers. The mask is specified using the MaskSettings.Mask property.

<dx:BootstrapButtonEdit runat="server">
    <MaskSettings Mask="+1 (999) 000-0000" IncludeLiterals="None" ErrorText="Please input missing digits" />
    ...
</dx:BootstrapButtonEdit>

Display Format

The DisplayFormatString property specifies the pattern used to format the value of an editor for display purposes, when the editor is not focused. Display values can be formatted using the standard formatting mechanism described in MSDN. For more information about composing format patterns, see the following MSDN topic: Formatting Types.

<dx:BootstrapButtonEdit runat="server" Text="12345" DisplayFormatString="[ 00 - 00 - 00 ]">
    ...
</dx:BootstrapButtonEdit>

Caption and HelpText

In this example, the Button Edit control displays a caption on the top and auxiliary help text at the bottom of the editor.

<dx:BootstrapButtonEdit runat="server" Caption="First Name" HelpText="Enter your first name">
    <ValidationSettings RequiredField-IsRequired="true"></ValidationSettings>
    ...
</dx:BootstrapButtonEdit>
Screen Size
Color Themes
Demo QR Code