The following sample is self explanatory and I would be surprised if it were by design:
<!DOCTYPE html>
<
html
>
<
head
>
<
title
></
title
>
<
link
href
=
"http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"http://cdn.kendostatic.com/2012.3.1114/styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"http://cdn.kendostatic.com/2012.3.1114/styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
<
script
src
=
"http://code.jquery.com/jquery-1.8.2.min.js"
type
=
"text/javascript"
></
script
>
<
script
src
=
"http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"
type
=
"text/javascript"
></
script
>
</
head
>
<
body
>
<
div
data-role
=
"view"
>
<
a
data-role
=
"button"
href
=
"#foo"
data-rel
=
"modalview"
>This triggers logTarget</
a
>
<
a
data-role
=
"button"
data-click
=
"open"
>This does not trigger logTarget</
a
>
<
div
id
=
"console"
></
div
>
</
div
>
<
div
data-role
=
"modalview"
id
=
"foo"
data-open
=
"logTarget"
>
This is a simple modal view
</
div
>
<
script
>
$(function(){
new kendo.mobile.Application();
});
function open(e) {
var modalView = $('#foo').data('kendoMobileModalView');
modalView.open();
}
function logTarget(e) {
$('#console').append('logTarget Triggered');
}
</
script
>
</
body
>
</
html
>
8 Answers, 1 is accepted
0
Hi,
Petyo
the Telerik team
Yes, this decision is by design - the API calls do not trigger events. The reason behind that is that the developer doing the API call would be aware of the open happening, and can call the event handler manually.
Kind regards,Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jack
Top achievements
Rank 2
Iron
answered on 16 Nov 2012, 09:58 AM
IMO, this is a strange design option because one would expect the open event to be triggered consistently however the widget is opened.
0
Richard
Top achievements
Rank 1
answered on 26 Aug 2013, 03:24 AM
Agree with Jack. It caused us lot of pain to try handle it before open the view.
0
Hello Guys,
I will forward your feedback to our developers, so they can consider it in the future.
Regards,
Kiril Nikolov
Telerik
I will forward your feedback to our developers, so they can consider it in the future.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ainsley
Top achievements
Rank 1
answered on 10 Oct 2014, 07:25 PM
So the only purpose is having data-before-open and data-open is to give the developer the option to e.preventDefault()? This doesnt make sense to me and I spent a great deal of time today thinking my code was buggy.
I agree with the others that this is confusing and should operate similarly to other views and API calls.
I agree with the others that this is confusing and should operate similarly to other views and API calls.
0
Hi Gene,
Thank you for contacting us and sharing your feedback.
I will add your feedback to the already created feedback topic, so it will be considered for future implementation.
Regards,
Kiril Nikolov
Telerik
Thank you for contacting us and sharing your feedback.
I will add your feedback to the already created feedback topic, so it will be considered for future implementation.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Grzegorz
Top achievements
Rank 1
answered on 03 Oct 2017, 10:15 AM
In the latest version still the same. I also wasted hour to identify where problem is. Can we count on a quick solution to this?
0
Hello Grzegorz,
I am afraid that the manual handling of the events, when they are trigger manually from the API is obligatory throughout the entire suite and products behavior. There are several exceptions in some specific scenarios, however, generally you should manually handle the events, as previously described in this thread.
Regards,
Nencho
Progress Telerik
I am afraid that the manual handling of the events, when they are trigger manually from the API is obligatory throughout the entire suite and products behavior. There are several exceptions in some specific scenarios, however, generally you should manually handle the events, as previously described in this thread.
Regards,
Nencho
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.