MVVM data-bind with z-index

3 posts, 1 answers
  1. John
    John avatar
    2 posts
    Member since:
    Aug 2013

    Posted 10 Sep 2013 Link to this post

    Hi,
    I had a problem when trying to embed z-index databinding. Below is my DOM:
    <div id="ItemContainer0" class="textItem ui-draggable" data-bind="style:
    {height: Height + 10 + 'px', width: Width + 10 + 'px', top: Y - 6 + 'px', left:
    X - 6 + 'px', 'z-index': Z}" index="0" style="height: 60px; width: 210px; top:
    77px; left: 135px;">

    The "width", "height", "top", "left" are rendered to "style" but z-index is not.
    What is my mistake?
    Please help me this problem. I searched google for a long time but I didn't see any answer.

    Thank you.
    John Vu
  2. Answer
    Alexander Popov
    Admin
    Alexander Popov avatar
    1445 posts

    Posted 10 Sep 2013 Link to this post

    Hello John,

    I tried to reproduce the issue in this example, but everything works as expected. Could you please check it and let me know how it differs from your setup?

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. John
    John avatar
    2 posts
    Member since:
    Aug 2013

    Posted 12 Sep 2013 Link to this post

    Thank you.

    Your example works! My problem is "zindex" instead of "zIndex".
Back to Top