Skip to main content

DataGridColumnBuilder<T>.EditCellTemplate(TemplateName) Method

Specifies the client-side editCellTemplate.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public DataGridColumnBuilder<T> EditCellTemplate(
    TemplateName name
)

Parameters

Name Type Description
name TemplateName

A template name.

Returns

Type Description
DataGridColumnBuilder<T>

A reference to this instance after the method is called.

Remarks

This method applies an external template to an edit cell. Refer to External Templates for more information and code examples.

@(Html.DevExtreme().DataGrid()
    .Columns(columns => {
        columns.Add().EditCellTemplate(new TemplateName("myDataGridColumn_editCellTemplate"));
    })
)

@using(Html.DevExtreme().NamedTemplate("myDataGridColumn_editCellTemplate")) {
    <div>
        Template content
    </div>
}

Refer to the Customize Editors topic and the Custom Editors demo for more information.

See Also