I have a Kendo grid in which I need different input controls in a single column depending on data. I have three scenarios:
true
, checkbox should come on edit.string
or number
, textbox should come on editPlease see the screenshot above.
In your template, where you define your columns, you can use a custom template for your cells. In this you can write some conditions to decide what to render:
<kendo-grid-column field="example" title="Example" width="100">
<ng-template kendoGridCellTemplate let-dataItem>
<!-- You can use ngIf and/or ngSwitch here. -->
</ng-template>
</kendo-grid-column>
API: https://www.telerik.com/kendo-angular-ui/components/grid/api/CellTemplateDirective/