Back to Devexpress

MVCxGridViewLayoutItemCollection Class

aspnetmvc-devexpress-dot-web-dot-mvc-1ae32827.md

latest3.2 KB
Original Source

MVCxGridViewLayoutItemCollection Class

Represents a (MVC specific) collection of layout items and groups within the FormLayout used in the GridView’s edit form.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public class MVCxGridViewLayoutItemCollection :
    GridViewLayoutItemCollection
vb
Public Class MVCxGridViewLayoutItemCollection
    Inherits GridViewLayoutItemCollection

The following members return MVCxGridViewLayoutItemCollection objects:

Remarks

The following example illustrates how to add a command item to the item collection in adaptive layout.

csharp
settings.SettingsAdaptivity.AdaptiveDetailLayoutProperties.Items.AddCommandItem("CommandColumnEdit");

The AddCommandItem(String) method gets a command column name that can be specified in the following ways:

csharp
settings.Columns.Add(new MVCxGridViewCommandColumn() { Name = "CommandColumnEdit", ShowEditButton = true, Visible = true });

Or…

csharp
settings.CommandColumn.Visible = true;  
settings.CommandColumn.ShowEditButton = true;  
settings.CommandColumn.Name = "CommandColumnEdit";

Implements

IList

ICollection

IEnumerable

IStateManager

DevExpress.Web.Internal.IStateManagerTracker

DevExpress.Web.Internal.IPropertiesDirtyTracker

DevExpress.Utils.IAssignableCollection

Inheritance

Object StateManagedCollectionBase Collection LayoutItemCollection GridLayoutItemCollection GridViewLayoutItemCollection MVCxGridViewLayoutItemCollection MVCxGridViewLayoutItemCollection<ModelType>

See Also

MVCxGridViewLayoutItemCollection Members

DevExpress.Web.Mvc Namespace