This is a migrated thread and some comments may be shown as answers.

Add/remove columns during runtime in angular app

3 Answers 307 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aroussos
Top achievements
Rank 1
Aroussos asked on 04 Jul 2017, 12:24 PM

How can I add or remove columns during runtime in an Kendo UI Angular grid?

Right now I call the ngInit after setting the new columns but it seems like not the best option.

 

Any ideas?

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 06 Jul 2017, 08:28 AM
Hello Aroussos,

If you want to change the columns structure dynamically you need to reinitialize the widget. In the context of AngularJS you could use the k-rebind to re-initialize the widget when the options are changed:
Hope this helps.


Regards,
Konstantin Dikov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Aroussos
Top achievements
Rank 1
answered on 06 Jul 2017, 08:31 AM

Hello Konstantin,

thanks for the info w but would appreciate if you could propose a solution for Angular 2 instead of AngularJS.

Thanks in advance

0
Boyan Dimitrov
Telerik team
answered on 10 Jul 2017, 06:31 AM
Hello,

What we can suggest is to use our native components for Angular 2. Please check Kendo UI for Angular site for demos and getting started articles. 

Regards,
Boyan Dimitrov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Aroussos
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Aroussos
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or