list view template

3 posts, 1 answers
  1. Sam
    Sam avatar
    4 posts
    Member since:
    Jun 2011

    Posted 17 Jan 2013 Link to this post

    is it recommended to put a table inside a list view template , i have the following template

    <script type="text/x-kendo-template" id="customListViewTemplate">        
            <table>
            <tr>
                <td>Product Name :
                </td>
                <td>${name}
                </td>
            </tr>
            <tr>
                <td>Desc :
                </td>
                <td>${description}
                </td>
            </tr>
            <tr>
                <td>Qty :
                </td>
                <td>
                    <input type="number" min="0" />
                </td>
            </tr>
        </table>
            
        </script>

    but when it get rendered, the numeric control seems to have a mind of its own, and never sits in its designated cell..

    Is this not the correct way to do this ? have a tabular formatted data in list view template

    Thanks
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 21 Jan 2013 Link to this post

    Hello Sam,

    The default styling of textboxes inside a listview is such, that they are positioned to the right. Indeed, this may cause unexpected behavior with custom templates. You can override the native styling with a CSS rule with a high-enough specificity (e.g. use an ID for the table and a CSS class for the inputs)

    #tableID  .inputClass
    {
        position: static;
        margin: 0;
    }

    All the best,
    Dimo
    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
  4. Sam
    Sam avatar
    4 posts
    Member since:
    Jun 2011

    Posted 21 Jan 2013 Link to this post

    that worked tnx
Back to Top