Skip to main content
All docs
V24.1

GanttColumnBuilder<T>.CellTemplate(JS) Method

Specifies a custom template for data cells. Mirrors the client-side cellTemplate object.

Namespace: DevExtreme.AspNet.Mvc.Builders

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public GanttColumnBuilder<T> CellTemplate(
    JS value
)

Parameters

Name Type Description
value JS

A JavaScript expression that specifies the option value.

Returns

Type Description
GanttColumnBuilder<T>

A reference to this instance after the method is called.

Remarks

This method allows you to define a cell template using a JavaScript function. You can access cellTemplate‘s parameters from this function. Refer to JavaScript Functions as Templates for more information.

@(Html.DevExtreme().Gantt()
    .Columns(columns => {
        columns.Add().CellTemplate(new JS("myGanttColumn_cellTemplate"));
    })
)

<script>
    function myGanttColumn_cellTemplate() {
        // Template rendering logic
    }
</script>
See Also