Kendo UI mobile listview add button

4 posts, 0 answers
  1. Pintoo
    Pintoo avatar
    5 posts
    Member since:
    Jun 2014

    Posted 26 Jun 2014 Link to this post

    I have a listview which shows arrow image on right to show detail.

    ------------------------------
    Item 1                           >
    ------------------------------
    Item 2                          >
    ------------------------------

    I have defined template to add link as following:
    <script id="hierarchicalLevelListViewTemplate" type="text/x-kendo-template">
            # if (haschildren) { #
            # var ecodedURI = '\\#level-view?levelId=' + levelId   + '&id=' + id  #
            <a href="#:ecodedURI#" data-transition="slide:left">
                #: Desc # 
            </a>
            # } else { #
            #: Desc #
            # } #
        </script>

    Everything works fine. Now, I want to add a button to the listview as shown below:
    ------------------------------
    Item 1                           >
    (button)
    ------------------------------
    Item 2 
    (Button)                         >
    ------------------------------

    What happens is, after adding button, the right arrow dissappear and both button and text becomes a link(are underlined).

    Can you please help me to implement this. Will appreciate if you point me to a working sample.


    Thanks!
  2. Pintoo
    Pintoo avatar
    5 posts
    Member since:
    Jun 2014

    Posted 26 Jun 2014 in reply to Pintoo Link to this post

    Attached is the sample project showing the behavior, click listview tab to replicate the issue.
  3. Kendo UI is VS 2017 Ready
  4. Pintoo
    Pintoo avatar
    5 posts
    Member since:
    Jun 2014

    Posted 27 Jun 2014 Link to this post

    Basically, I have 2 actions per list item, so trying to implement 2 clickable items in the list.

    Attached is visual of what I am trying to achieve.

    Here is the link of similar implementation in Jquery: http://jsfiddle.net/Shreerang/aYPWw/1/light/

  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 30 Jun 2014 Link to this post

    Hello,

    the behavior you describe is by design. The listview automatically converts the template to a listview link item only if the template contains a single A element. You may customize the links look and add the arrows in question manually. 

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready