This question is locked. New answers and comments are not allowed.
According to this thread: http://www.telerik.com/forums/bug-data-open-handler-not-triggered-when-open-method-is-used-to-show-the-modal-view , it is by design that the data-open event handler is not fired when you call modalview.open() directly. The admin states:
"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."
However, if you call modalview.close(), the data-close event handler is fired. That is inconsistent and very confusing.
One suggestion is that perhaps if a handler is provided in the method call, it should be used but if not, the data-xxxx handler should be used as a fallback.
Example A: If modalview.close() is called, the data-close handler should be used.
Example B: If modalview.close(function (e) { ...do stuff... }) is called, then the "...do stuff..." handler should be used.
"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."
However, if you call modalview.close(), the data-close event handler is fired. That is inconsistent and very confusing.
One suggestion is that perhaps if a handler is provided in the method call, it should be used but if not, the data-xxxx handler should be used as a fallback.
Example A: If modalview.close() is called, the data-close handler should be used.
Example B: If modalview.close(function (e) { ...do stuff... }) is called, then the "...do stuff..." handler should be used.