Skip to main content
A newer version of this page is available. .

MVCxGridViewColumn.SetDataItemTemplateContent(String) Method

Allows setting a template for displaying data cells within the current column.

Namespace: DevExpress.Web.Mvc

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

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