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

list view template

2 Answers 151 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 17 Jan 2013, 08:26 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 21 Jan 2013, 03:49 PM
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!
0
Sam
Top achievements
Rank 1
answered on 21 Jan 2013, 07:40 PM
that worked tnx
Tags
ListView (Mobile)
Asked by
Sam
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Sam
Top achievements
Rank 1
Share this question
or