Back to Devexpress

ASPxGridView.SettingsCommandButton Property

aspnet-devexpress-dot-web-dot-aspxgridview-b03b53ac.md

latest2.4 KB
Original Source

ASPxGridView.SettingsCommandButton Property

Gets the settings of the ASPxGridView’s command buttons.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public ASPxGridViewCommandButtonSettings SettingsCommandButton { get; }
vb
Public ReadOnly Property SettingsCommandButton As ASPxGridViewCommandButtonSettings

Property Value

TypeDescription
ASPxGridViewCommandButtonSettings

Contains the settings of the ASPxGridView’s command buttons.

|

Remarks

Use the SettingsCommandButton property to configure command buttons.

Note

Add a command column and enable an appropriate Show[button_name]Button property to display command buttons in the grid.

In markup:

aspx
<dx:ASPxGridView ID="GridView1" runat="server" >
    <Columns>
        <dx:GridViewCommandColumn ShowNewButton="true" ShowEditButton="true" ButtonRenderMode="Image" />
        // ...
    </Columns>
    <SettingsCommandButton>
        <NewButton>
            <Image ToolTip="New" Url="Images/new.png" />
        </NewButton>
        <UpdateButton RenderMode="Image" />
    </SettingsCommandButton>
</dx:ASPxGridView>

In code:

csharp
GridViewCommandColumn commandColumn = new GridViewCommandColumn();
commandColumn.ShowNewButton = true;
commandColumn.ShowEditButton = true;
commandColumn.ButtonRenderMode = GridCommandButtonRenderMode.Image;
GridView1.Columns.Add(commandColumn);
GridView1.SettingsCommandButton.NewButton.Image.Url = "Images/new.png";
GridView1.SettingsCommandButton.NewButton.Image.ToolTip = "New";
GridView1.SettingsCommandButton.UpdateButton.RenderMode = GridCommandButtonRenderMode.Image;

Online demo

ASPxGridView - Custom Command Buttons

See Also

ASPxGridView Class

ASPxGridView Members

DevExpress.Web Namespace