Back to Devexpress

GridViewCommandColumn.ShowNewButtonInHeader Property

aspnet-devexpress-dot-web-dot-gridviewcommandcolumn-27352848.md

latest2.7 KB
Original Source

GridViewCommandColumn.ShowNewButtonInHeader Property

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

Declaration

csharp
[DefaultValue(false)]
public bool ShowNewButtonInHeader { get; set; }
vb
<DefaultValue(False)>
Public Property ShowNewButtonInHeader As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

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

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.

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

Grid View

GridViewCommandColumn Class

GridViewCommandColumn Members

DevExpress.Web Namespace