aspnet-devexpress-dot-web-dot-gridviewcommandcolumn-5caebf60.md
Specifies whether the Edit command button is displayed in the command column.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(false)]
public bool ShowEditButton { get; set; }
<DefaultValue(False)>
Public Property ShowEditButton As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true, if the button is visible; otherwise, false.
|
Use the ShowEditButton property to specify whether the Edit button is visible in the command column. The button settings can be customized using the ASPxGridViewCommandButtonSettings.EditButton property.
In markup:
<dx:ASPxGridView ID="ASPxGridView1" runat="server" >
<Columns>
<dx:GridViewCommandColumn ShowEditButton="True" />
...
</Columns>
</dx:ASPxGridView>
In code:
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e) {
ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
GridViewCommandColumn commandColumn = new GridViewCommandColumn();
commandColumn.ShowEditButton = true;
grid1.Columns.Add(commandColumn);
...
}
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowEditButton property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
asp-net-web-forms-grid-create-master-detail-grid-at-runtime/CS/MasterDetailGrids/Default.aspx.cs#L65
GridViewCommandColumn colCmd = new GridViewCommandColumn();
colCmd.ShowEditButton = true;
masterGrid.Columns.Add(colCmd);
asp-net-web-forms-grid-create-master-detail-grid-at-runtime/VB/MasterDetailGrids/Default.aspx.vb#L67
Dim colCmd As New GridViewCommandColumn()
colCmd.ShowEditButton = True
masterGrid.Columns.Add(colCmd)
See Also