Skip to main content
Tab

ASPxButtonEditBase.Buttons Property

Gets the collection of editor buttons.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public EditButtonCollection Buttons { get; }

Property Value

Type Description
EditButtonCollection

An EditButtonCollection object representing the collection of buttons displayed within the editor.

Remarks

This property is a wrapper of the ButtonEditPropertiesBase.Buttons property. Refer to its description for more information.

ASPxButtonEdit:

<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>
function OnButtonClick(s, e) {
    var buttonElement = s.GetButton(e.buttonIndex);
    alert("Button " + buttonElement.innerText + " is clicked");
}

Important

The ClearButton object is not in effect in the Buttons collection. Instead, use the ClearButton property to customize the ‘Clear’ button.

Online Demo: Clear Button

The following example illustrates how to add the ‘Clear’ button to an editor.

<dx:ASPxButtonEdit ID="ASPxButtonEdit2" runat="server">
    <Buttons>
        ...
    </Buttons>
    <ClearButton DisplayMode="Always"></ClearButton>
</dx:ASPxButtonEdit>
See Also