Reference to current item in a template

2 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 07 Dec 2012 Link to this post

    Inside an MVVM bound template, how do I get access to the data item itself?

    This doesn't give it to me (clearly eh) :)

    <li data-bind="invisible: #= console.log(this) #">
        <span>test</span>
    </li>
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 10 Dec 2012 Link to this post

    Hello Steve,

    It is actually called data. The following expressions are actually just the same:

    #= data.PersonID #
    #= PersonID #


    All the best,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top