MVCxFormLayoutItem.SetNestedContent(Action) Method

Allows you to define the FormLayout item's nested content.

Namespace: DevExpress.Web.Mvc

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

Declaration

public void SetNestedContent(
    Action method
)
Public Sub SetNestedContent(
    method As Action
)

Parameters

Name Type Description
method Action

A method to which content rendering is delegated.

Remarks

The code sample below demonstrates how to use the SetNestedContent method to define the item's content.

View code:


@Html.DevExpress().FormLayout(
    settings =>
    {
        settings.Name = "myFormLayout";
        ...
        //Adding a layout item with the third-party editor and custom HTML 
        settings.Items.Add(i =>
        {
            i.SetNestedContent(() =>
            {
                ViewContext.Writer.Write("<div class=\"divWithStandardTextBox\">");
                ViewContext.Writer.Write(Html.TextBoxFor(m => m.Id));
                ViewContext.Writer.Write("</div>");
            });
        });
    }
).GetHtml()
See Also