Clickable elements inside ListView Item

6 posts, 0 answers
  1. Ioan
    Ioan avatar
    34 posts
    Member since:
    Dec 2012

    Posted 02 Mar 2015 Link to this post

    Is there a way to make an element inside a ListView clickable without changing the state of the ListView's entire item ? 
    http://jsbin.com/kevoso/3/edit
    In this jsbin example, if I click on the Kendo Button, the ListView item won't change it's state but if I click on the favorite icon the item will change its state.

    On another subject, It seems a thread started by me a few days ago in DataSource got deleted....
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 04 Mar 2015 Link to this post

    Hi Ioan,

    You may use the touch component. Please check the following example: http://dojo.telerik.com/@valchev/Ekefi

    Regards,
    Alexander Valchev
    Telerik
     
    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
  4. Ioan
    Ioan avatar
    34 posts
    Member since:
    Dec 2012

    Posted 06 Mar 2015 in reply to Alexander Valchev Link to this post

    If I use the 'a' tag to have the entire list item clickable, it won't work. Mostly visually, to get that click effect over the entire list item. But if I click on an item  inside the listview, the entire item shouldn't looked clicked. It works with kendo buttons, but not with my own elements.
    In your example you used 
    <div>#: data # <span data-role="touch" data-tap="onTap">tap on me</span></div>
    ,but I need 
    <a>#: data # <span data-role="touch" data-tap="onTap">tap on me</span></a>


    http://dojo.telerik.com/EduWE/2
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 10 Mar 2015 Link to this post

    Hi Ioan,

    In your example, the console.log fires as expected. Please check the attached screen shot and let me know what I am missing.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Ioan
    Ioan avatar
    34 posts
    Member since:
    Dec 2012

    Posted 10 Mar 2015 in reply to Alexander Valchev Link to this post

    It fires, techincally it works, but when you press the button inside the element list, it looks like you're pressing the whole element. The background of the element list is changing too. I don't want the visual press effect to propagate on the whole element, just only the button I press inside the list element...
  7. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 12 Mar 2015 Link to this post

    Hello Ioan,

    the behavior you describe is by design and unavoidable, since the template contains an A element. To avoid that, you should not use A elements. 

    Also, I think that you referred to this thread.

    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