Back to Devexpress

ASPxButtonEditBase.Buttons Property

aspnet-devexpress-dot-web-dot-aspxbuttoneditbase.md

latest2.5 KB
Original Source

ASPxButtonEditBase.Buttons Property

Gets the collection of editor buttons.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public EditButtonCollection Buttons { get; }
vb
Public ReadOnly Property Buttons As EditButtonCollection

Property Value

TypeDescription
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:

aspx
<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>
js
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.

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

See Also

ButtonEdit

ASPxButtonEditBase Class

ASPxButtonEditBase Members

DevExpress.Web Namespace