Okay binding in that way does not throw an exception but now the event doesn't fire. Here is a little more context.
My view:
<
div
data-role
=
"view"
data-show
=
"app.exports.showSummary"
>
<
ul
class
=
"deliveryMethod"
data-role
=
"buttongroup"
data-index
=
"0"
data-bind
=
"events: { select: deliveryMethodChanged }"
>
<
li
>
Email
</
li
>
<
li
>
Download
</
li
>
</
ul
>
</
div
>
My JavaScript:
var
exports = (
function
() {
var
_viewModel = kendo.observable({
deliveryMethodChanged:
function
(e) {
alert(
"deliveryMethodChanged"
);
}
});
return
{
showSummary:
function
(e) {
kendo.bind(e.view.content, _viewModel);
// how I have been able to get it to work
//var deliveryMethod = e.view.content.find(".deliveryMethod").data("kendoMobileButtonGroup");
//deliveryMethod.bind("select", _viewModel.deliveryMethodChanged);
}
};
})();
The commented out lines in showSummary is how I've been able to accomplish the binding without attribute binding. I don't see what the difference is.