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

Scope and Data binding in angular kendo grid

3 Answers 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JSON
Top achievements
Rank 1
JSON asked on 06 Sep 2014, 12:15 AM
I have an angular widget that I'm placing into an angular kendo grid table row. In this widget, you can enter some text for a tag and this will be communicated to a rest endpoint and then updated within the widget on the data set. In regular angular, the two way data binding will automatically update this to whatever is associated with the same data set. In addition, you can use the scope chain for publish/subscribe events ($broadcast, $emit, $on) to listen for change events. When I place the widget into the kendo layout, it will render and update it's own data set, but this will not propagate to the other data sets. In addition, events on the scope chain won't emit up to the parent containers. So at some point, kendo is creating a new scope without inheriting from the parent scope (or so it seems). 

So the question is...how do we bind the data, or scope so that we can update other display items that rely on the binding? It doesn't seem possible with the grid.

Any help is appreciated.

3 Answers, 1 is accepted

Sort by
0
JSON
Top achievements
Rank 1
answered on 06 Sep 2014, 01:02 AM
In addition to my previous problem, every time I fire the tag widget, it causes the grid to re-render (at least from what I can tell the dataBound event is fired, that means re-rendering?) and a $destroy event is fired. How do I stop this?
0
JSON
Top achievements
Rank 1
answered on 06 Sep 2014, 01:37 AM
Sorry to keep replying to my own posts...it appears when the widget updates the data, it causes the table to redraw and fire the "dataBound" event. I think this is firing the $destroy.
0
Georgi Krustev
Telerik team
answered on 10 Sep 2014, 07:38 AM
Hello Joe,

I am afraid that it is not very clear what is the exact problem. Could you provide more information which will help us to understand the implementation and reproduce the issue locally? A runnable Dojo demo will be great.

As to the question about the grid re-drawing, when dataBound event is raised the widget is re-drawn. The dataBound event will be trigger when data source is changed.

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