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

Refresh content of Kendo Panelbar

1 Answer 422 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carla
Top achievements
Rank 1
Veteran
Carla asked on 23 Oct 2018, 12:11 AM

Hi there,

I'm looking to display different data than the one initialized in my panelbar and panelbar-items in the constructor. I'm getting my data programmatically and would like to change the data the same way. 

The request will come from a global switch that sets a few global flags. Actually I will be switching the data in the panelbar back and forth, there is only data A and data B.

Thanks in advanced,

Carla

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 24 Oct 2018, 07:45 AM
Hello Carla,

You can rerender the PanelBar with a different data set by replacing the collection the items property is bound to, e.g.:

https://stackblitz.com/edit/angular-vh1ta2?file=app/app.component.ts

Further details about the Data binding mechanics of the PanelBar are available in the following section of our documentation:

https://www.telerik.com/kendo-angular-ui/components/layout/panelbar/data-binding/

Alternatively, you can have two PanelBar components in the markup and display only one of them conditionally via *ngIf, e.g.:

https://stackblitz.com/edit/angular-vh1ta2-uvnfdh?file=app/app.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Carla
Top achievements
Rank 1
Veteran
Answers by
Dimiter Topalov
Telerik team
Share this question
or