GridViewLayoutItemCollection.AddCommandItem(String) Method
Adds the specified item to the GridViewLayoutItemCollection collection.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
Declaration
Parameters
Name | Type | Description |
---|---|---|
columnName | String | The command item name. |
Returns
Type | Description |
---|---|
EditModeCommandLayoutItem | The newly added command item. |
Remarks
The following example illustrates how to add a command item to the item collection in adaptive layout.
settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddCommandItem("CommandColumnEdit");
The AddCommandItem(String)
method gets a command column’s name that can be specified in the following ways:
settings.Columns.Add(new MVCxGridViewCommandColumn() { Name = "CommandColumnEdit", ShowEditButton = true, Visible = true });
Or…
settings.CommandColumn.Visible = true;
settings.CommandColumn.ShowEditButton = true;
settings.CommandColumn.Name = "CommandColumnEdit";
See Also