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

ListView data-binding event attribute not handled

1 Answer 72 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Brandon Peterson
Top achievements
Rank 2
Brandon Peterson asked on 05 Sep 2013, 08:53 PM
The dataBound event can be wired up by data attribute but dataBinding cannot. Why?
<ul data-role="listview" data-bind="source: exampleData" data-binding="onDataBinding" data-bound="onDataBound"></ul>
<script type="text/javascript">
    function onDataBound (e) {
        console.log("this works");
    }
    function onDataBinding (e) {
        console.log("this doesn't");
    }
</script>

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 06 Sep 2013, 08:26 AM
Hi Brandon,

This is a bug in the ListView widget which we will try to address as soon as possible. Meanwhile please initialize the widget via jQuery plug-in syntax at the init event of the corresponding view.
<div data-role="view">
    <ul id="foo"></ul>
</div>
 
<script>
$("#foo").kendoMobileListView({
   dataSource: new kendo.data.DataSource({
        data: [{title: "foo"}, {title: "bar"}]
   }),
   dataBinding: function(e) {
     console.log(e);
   }
});
 
new kendo.mobile.Application();
</script>

As a small sign of our appreciation for bringing this to our attention I updated your Telerik points.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
Brandon Peterson
Top achievements
Rank 2
Answers by
Alexander Valchev
Telerik team
Share this question
or