How to dynamically add/render Kendo UI controls in kendo ui grid - Angular

1 Answer 169 Views
Grid
Raj
Top achievements
Rank 1
Raj asked on 04 Jul 2021, 10:24 PM

How can we create kendo ui controls dynamically? I have Angular Kendo UI grid, one column is name of control and depending on that I want to render Kendo control in next column.

I can't use ngSwitch or ngIf as I don't want to already keep html and just hide unhide. I want to render elements runtime.

 

Column 1Column 2----------------
Dropdownkendo-combobox contorl
Date

kendo-datepicker

 

As per above, my first row's column name should render combo box and second row should show date picker and so on.

1 Answer, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 13 Jul 2021, 04:54 PM

You can render the columns dynamically however you will probably need an ngIf or switch to determine what template to render using kendoGridEditTemplates and have one for each type. The combo box will be harder as it could possibly have a data source and configuration as well. 

Tags
Grid
Asked by
Raj
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or