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

problem binding

3 Answers 43 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Alan Mosley
Top achievements
Rank 1
Alan Mosley asked on 03 Oct 2014, 02:59 PM
I am trying to bind to a list view, but with no luck, I have checked with fiddler that data contains an array and is populated correctly.
Where am I going wrong thanks

var vm = kendo.observable({ jobs: data });
kendo.bind($("#jobs-list"), vm);



<ul id="job-ul" data-role="listview" data-style="inset" data-type="group" data-template="jobs-list-template" data-bind="source: jobs"></ul>
 
<script type="text/x-kendo-template" id="jobs-list-template">
    <li class="row job-list-item" data-bind="attr: {'data-job-id': JobId}">
        <h3><span data-bind="text: Property"></span> <span data-bind="text: LocationName"></span></h3>
    </li>
</script>

3 Answers, 1 is accepted

Sort by
0
Alan Mosley
Top achievements
Rank 1
answered on 04 Oct 2014, 01:26 PM
Forgot to mention the error I am getting
Uncaught TypeError: Object #<Text> has no method 'getAttribute'
0
Accepted
Petyo
Telerik team
answered on 07 Oct 2014, 07:26 AM
Hi Alan,

given the attributes, I assume that you are trying to bind a mobile listview. In that case, you should either specify the full path to the widget, or set namespaces in the kendo.bind call. Please check this example I prepared based on your code.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Alan Mosley
Top achievements
Rank 1
answered on 07 Oct 2014, 07:39 AM
Thanks
Tags
MVVM
Asked by
Alan Mosley
Top achievements
Rank 1
Answers by
Alan Mosley
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or