listview put serveral widgets in a li

2 posts, 0 answers
  1. fang
    fang avatar
    15 posts
    Member since:
    Apr 2013

    Posted 18 May 2013 Link to this post

     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>
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 21 May 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top