Skip to main content

MVCxFormLayoutItem.SetNestedContent(String) Method

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

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public void SetNestedContent(
    string content
)

Parameters

Name Type Description
content String

A string value specifying the nested content.

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 custom HTML content
        settings.Items.Add(i =>
        {
            i.SetNestedContent("<div style=\"padding:10px\"><b>Custom content</b> <i>goes here</i></div>");
        });
    }
).GetHtml()
See Also