aspnet-devexpress-dot-web-dot-gridviewcommandcolumn-27352848.md
Specifies whether the New command button is displayed in the command column header.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(false)]
public bool ShowNewButtonInHeader { get; set; }
<DefaultValue(False)>
Public Property ShowNewButtonInHeader As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true, if the button is visible; otherwise, false.
|
Use the ShowNewButtonInHeader property to specify whether the New button is visible in the command column header. To display the button in the command column, set the GridViewCommandColumn.ShowNewButton property to true. The button settings can be customized using the ASPxGridViewCommandButtonSettings.NewButton property.
Note
For a full example, refer to ASPxGridView in Batch Edit mode - Implement the Select All feature for the CheckBox column.
The following example illustrates how to use the ShowNewButtonInHeader property.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" DataSourceID="AccessDataSource1"
AutoGenerateColumns="False" ClientInstanceName="Grid" KeyFieldName="ProductID"
OnCustomErrorText="ASPxGridView1_CustomErrorText" OnRowUpdating="ASPxGridView1_RowUpdating">
...
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0" ShowNewButtonInHeader="true" ShowDeleteButton="true">
</dx:GridViewCommandColumn>
...
</Columns>
</dx:ASPxGridView>
Result:
See Also