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

Databound event not firing

4 Answers 460 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Boomerang
Top achievements
Rank 1
Boomerang asked on 26 Jun 2015, 02:01 PM

Hello!

When using the grid in a kendo-window the databound event is not triggered. When using the same grid outside of the kendo window the event is triggered like expected.

 

Has anyone else experienced issues like this? Any solutions for this problem?

4 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 30 Jun 2015, 06:28 AM

Hello Karin,

I was unable to reproduce the issue on my end. Could you demonstrate it in small runnable example, so I could inspect it locally?

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Boomerang
Top achievements
Rank 1
answered on 30 Jun 2015, 11:48 AM

Hello Dimiter!

The problem was a bit more complicated than I described before. When wrapping the kendo grid in a custom directive having defined a databound event this event was not triggered when the grid was displayed in a kendo window.

I found that this was related to which kendo UI libraries I was using.

 

The problem was discovered when using 2015.1.318 without referring angular-kendo.js, which defines the kendo.directives. But this is already defined in Kendo UI 2015.1.318, so this should not be necessary, right?

 

I attached an example where you can try this out if you change these references:

<script src="http://cdn.kendostatic.com/2015.1.318/js/kendo.all.min.js"></script>
<!--<script src="scripts/angular-kendo.js"></script>-->

 

to

<script src="http://cdn.kendostatic.com/2015.1.318/js/kendo.all.min.js"></script>
<script src="scripts/angular-kendo.js"></script>

 

the events are triggered as expected. Should I have to reference "angular-kendo.js", or is this a bug?

0
Boomerang
Top achievements
Rank 1
answered on 30 Jun 2015, 12:43 PM

I found that using angular-kendo together with the later versions of Kendo UI threw this error from time to time:

 e.element is null
Z<.destroy@http://cdn.kendostatic.com/2015.2.624/js/kendo.all.min.js:9:31796
Sn<.destroy@http://cdn.kendostatic.com/2015.2.624/js/kendo.all.min.js:30:8292
setupBindings/prev_destroy<@http://b2edge.com:8080/v6130210/lib/angular-kendo/angular-kendo.js:213:19

 

So using Angular-Kendo bindings together with the newer versions of Kendo UI does not seem to be an option.

0
Dimiter Madjarov
Telerik team
answered on 01 Jul 2015, 11:39 AM

Hello Karin,

Using both the kendo-grid directive and the custom b2e-kendo-grid directive like in the current implementation is not recommended. I would suggest to leave only the custom one and initialize the Grid widget inside of it using the constructed options.
E.g.

$($element).kendoGrid(options);

Additionally when setting the data of the dataSource, I would recommend using it's data() method.

For convenience I updated the provided sample code. You could find it attached to the post.

Regards,
Dimiter Madjarov
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
Boomerang
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Boomerang
Top achievements
Rank 1
Share this question
or