GridViewSettings.EditFormLayoutProperties Property
Contains settings allowing you to customize the edit form layout.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
MVCxGridViewFormLayoutProperties | An object that contains the edit form layout settings. |
Remarks
When the UseFormLayout property is set to true
(the default value), the GridView uses the built-in FormLayout extension to display the edit form. Use the EditFormLayoutProperties
property to access and customize the edit form’s settings.
var grid = Html.DevExpress().GridView(settings => {
settings.Name = "gvEditing";
settings.KeyFieldName = "EmployeeID";
settings.CallbackRouteValues = new { Controller = "Editing", Action = "EditFormLayoutPartial" };
// ...
settings.EditFormLayoutProperties.ColCount = 2;
settings.EditFormLayoutProperties.Items.AddTabbedGroupItem(tabbedGroupSettings => {
tabbedGroupSettings.ColumnSpan = 2;
tabbedGroupSettings.Items.AddGroupItem(groupEmployeeInformation => {
groupEmployeeInformation.ColumnCount = 2;
groupEmployeeInformation.Caption = "Employee Information";
groupEmployeeInformation.Items.AddGroupItem(groupSettings => {
groupSettings.GroupBoxDecoration = GroupBoxDecoration.None;
groupSettings.Paddings.PaddingBottom = Unit.Pixel(0);
groupSettings.Items.Add("FirstName");
groupSettings.Items.Add("LastName");
groupSettings.Items.Add("BirthDate");
});
groupEmployeeInformation.Items.AddGroupItem(groupSettings => {
groupSettings.GroupBoxDecoration = GroupBoxDecoration.None;
groupSettings.Paddings.PaddingBottom = Unit.Pixel(0);
groupSettings.Items.Add("HireDate");
groupSettings.Items.Add("Title");
groupSettings.Items.Add(i => {
i.ColumnName = "FireDate";
i.Caption = "Dismissal Date";
i.HelpText = "When you specify a dismissal date, an additional 'Dismissal Information' tab will be shown.";
});
});
// ...
See Also