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

Use ObservableArray with kendo-panel-bar

1 Answer 55 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Pascal
Top achievements
Rank 1
Pascal asked on 16 Oct 2014, 02:28 PM
I've a kendo-panel-bar (using the AngularJs directive) which I would like to bind to a datasource. Unfortunately it seems like the panel bar cannot bind to a kendo.data.ObservableArray. Setting the datasource to an array works fine, setting it to an ObservableArray results in a "Cannot read property 'length' of undefined" exception.

I'm aware of the solution with k-rebind (provided here: https://github.com/kendo-labs/angular-kendo/issues/269) Since I want to use the panel bar bound to a Breeze datasource (which internally uses a ObservableArray), this is unfortunately not a solution for me.

Are there any other possibilities to have a panel bar bound to an ObservableArray?

1 Answer, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 20 Oct 2014, 02:05 PM
Hello Pascal,

I am afraid that currently the panelbar does not feature the data binding abilities which most of the other databound widgets support.

The k-rebind solution is a viable one in your case, though. You can convert the observable array to regular object using the toJSON() method, and point the k-rebind to a property which gets changed when changes occur. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
PanelBar
Asked by
Pascal
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or