Skip to main content

MVCxGridViewColumn.SetDataItemTemplateContent(String) Method

Allows you to specify a template for data cells in the current column.

Namespace: DevExpress.Web.Mvc

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

NuGet Package: DevExpress.Web.Mvc5

Declaration

public void SetDataItemTemplateContent(
    string content
)

Parameters

Name Type Description
content String

A string value specifying the template content.

Remarks

settings.Columns.Add(column =>
{
    column.FieldName = "BDG_BAD_ACTIVE";
    column.ColumnType = MVCxGridViewColumnType.CheckBox;
    column.SetDataItemTemplateContent(c =>
    {
        Html.DevExpress().CheckBox(cb =>
        {
          ...
          cb.Name = "cb_" + c.KeyValue.ToString();
          cb.ClientEnabled = false;
        }).Render();
    });
});
See Also