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

GridViewCommandColumnButton.Text Property

Gets or sets the button text.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

[DefaultValue("")]
public string Text { get; set; }

Property Value

Type Default Description
String String.Empty

A String value specifying the button text.

Remarks

The GridViewCommandColumnButton class is obsolete. Use the SettingsCommandButton property to access command buttons settings:

Online demo: ASPxGridView - Custom Command Buttons

Note

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

Declaratively:

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

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;
See Also