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

listview put serveral widgets in a li

1 Answer 45 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
fang
Top achievements
Rank 1
fang asked on 19 May 2013, 04:19 AM
 i want to put serveral widgets in a li ,  serveral widget in one line ,  multi lines in a listview, but i find  something wrong with it , is it my configure not right? for exmaple, only the first switch can be seen,the second is invisiable,  and the squence of widgets are not same as code below
<div data-role="view" id="foo"  data-title="trest1">
   <ul data-role="listview"  >
      <li>
            <span>test</span>
            <input id="slider" class="balSlider" value="0" />
            <a data-role="button">Foo</a>
            <input type="checkbox" data-role="switch" />       
            <a data-role="button">Foo</a>    
            <input type="checkbox" data-role="switch" />   
      <li>
             <a data-role="button">Foo</a>
             <a data-role="button">Foo</a>
            <input type="checkbox" data-role="switch" />       
            <a data-role="button">Foo</a>    
            <input type="checkbox" data-role="switch" />        
      </li>
 </ul>

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 21 May 2013, 04:18 PM
Hi King,

Thank you for the runnable example. I believe the issue with Switch widgets is caused by the absolute position which is set by default (i.e. all of the Switch controls in a particular list item аrе rendered, however they are one over another). Hence in order to show all of the Switch widgets you should override the default styling. As an example: 
$("#switch1").parent().css('right', '120px');

Also, in the provided configuration I observed invalid HTML - there are some unclosed <LI> tags.
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
fang
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or