Skip to main content
A newer version of this page is available. .
Tab

ASPxButtonEdit Class

Represents an edit control with embedded buttons.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public class ASPxButtonEdit :
    ASPxButtonEditBase

Remarks

The ASPxButtonEdit class represents a text box editor which allows one or more buttons to be displayed within its client region. The following image demonstrates an ASPxButtonEdit with 2 buttons:

ASPxButtonEdit_control.png

The ASPxButtonEdit control maintains its buttons within a collection accessed via the ASPxButtonEditBase.Buttons property. An individual button is represented by an instance of the EditButton class. Each button can display text, or an image, or both. You can control the button’s visibility, availability to end-users and position within the editor’s text box. The common button appearance can be defined via the ASPxButtonEditBase.ButtonStyle property.

When an end-user clicks an editor button, the click can be processed either on the client, via the ASPxClientButtonEditBase.ButtonClick event, or on the server, by handling the ASPxButtonEditBase.ButtonClick event. The clicked button can be identified by its index in the event handlers.

The ASPxButtonEdit contains several properties that allow you to control its text editing behavior. You can specify the content text’s horizontal alignment via the ASPxButton.HorizontalAlign property. To mask user input into the editor’s text box, set the ASPxTextBoxBase.Password property to true. Using the ASPxTextBoxBase.MaxLength property, the user input can be limited to a specified number of characters.

The ASPxButtonEdit editor supports masked input. The editor’s mask settings can be accessed via the ASPxButtonEdit.MaskSettings property. A mask expression can be specified via the MaskSettings.Mask property of the editor.

Note

The client-side equivalent of this editor control is represented by the ASPxClientButtonEdit object. The editor’s client-side API is enabled if the ASPxEditBase.EnableClientSideAPI property is set to true, or the ASPxEditBase.ClientInstanceName property is defined, or any client event is handled. Available client events can be accessed via the ASPxButtonEdit.ClientSideEvents property.

<dx:ASPxButtonEdit ID="ASPxButtonEdit2" runat="server">
    <ClientSideEvents ButtonClick="OnButtonClick" />
    <Buttons>
        <dx:EditButton Text="AA">
        </dx:EditButton>
        <dx:EditButton Text="BB">
        </dx:EditButton>
    </Buttons>
</dx:ASPxButtonEdit>
See Also