problem binding

4 posts, 1 answers
  1. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 03 Oct 2014 Link to this post

    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>
  2. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 04 Oct 2014 in reply to Alan Mosley Link to this post

    Forgot to mention the error I am getting
    Uncaught TypeError: Object #<Text> has no method 'getAttribute'
  3. Answer
    Petyo
    Admin
    Petyo avatar
    2440 posts

    Posted 07 Oct 2014 Link to this post

    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!
     
  4. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 07 Oct 2014 in reply to Petyo Link to this post

    Thanks
Back to Top