Skip to main content
Tab

GridViewCommandColumn.ShowNewButtonInHeader Property

Specifies whether the New command button is displayed in the command column header.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

[DefaultValue(false)]
public bool ShowNewButtonInHeader { get; set; }

Property Value

Type Default Description
Boolean false

true, if the button is visible; otherwise, false.

Remarks

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.

Example

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:

ASPxGridView-ShowNewButtonInHeader

See Also