aspnet-devexpress-dot-web-dot-gridviewcommandcolumn-45f3a897.md
Specifies whether the Cancel 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 ShowCancelButton { get; set; }
<DefaultValue(False)>
Public Property ShowCancelButton As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true, if the button is visible; otherwise, false.
|
Use the ShowCancelButton property to specify whether the Cancel button is visible in the command column. The button settings can be customized using the ASPxGridViewCommandButtonSettings.CancelButton property.
In markup:
<dx:ASPxGridView ID="ASPxGridView1" runat="server" >
<Columns>
<dx:GridViewCommandColumn ShowCancelButton="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.ShowCancelButton = true;
grid1.Columns.Add(commandColumn);
...
}
See Also