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

Kendo UI mobile listview add button

3 Answers 156 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Pintoo
Top achievements
Rank 1
Pintoo asked on 26 Jun 2014, 07:15 PM
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!

3 Answers, 1 is accepted

Sort by
0
Pintoo
Top achievements
Rank 1
answered on 26 Jun 2014, 10:33 PM
Attached is the sample project showing the behavior, click listview tab to replicate the issue.
0
Pintoo
Top achievements
Rank 1
answered on 27 Jun 2014, 01:23 PM
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/

0
Petyo
Telerik team
answered on 30 Jun 2014, 10:53 AM
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!
 
Tags
ListView (Mobile)
Asked by
Pintoo
Top achievements
Rank 1
Answers by
Pintoo
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or