I have column collection of type GridColumnProps, i want to dynamically add columns to these collection. I there any way to do that.
3 Answers, 1 is accepted
0
Stefan
Telerik team
answered on 22 Jul 2019, 08:14 AM
Hello, Mukesh,
Is it possible to provide a code to see how this collection is created and how it looks as a structure?
This will allow us to provide more to the point suggestion for the current use case.
Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
i want to add image columns dynamically based on props value.
Is that possible to achive that??
0
Stefan
Telerik team
answered on 23 Jul 2019, 10:37 AM
Hello, Mukesh,
Thank you for the code.
The column can be added to the collection by pushing a new item inside the array based on the prop.
This can by done before the component mounts or during a custom event, but the the column has to be inside the state, so the app re-renders once the new column is added:
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items