How to auto-select with checkbox tapped item?

4 posts, 1 answers
  1. Martin
    Martin avatar
    18 posts
    Member since:
    May 2014

    Posted 29 Aug 2014 Link to this post

    Hi,
    there is difference between the native Windows Phone implementation of checkboxes in list and Telerik DataBoundListBox.
    When I click in the WP Email app the empty area on the left next to an email, the checkboxes shows up and the tapped email is selected.
    In DataBoundListBox only the checkboxes shows up and I have to tap again to select the item.
    Also if I deselect the last item in Email app, the checkboxes disappear again, in DataBoundListBox the checkboxes stay there.

    Is there a way how automatically select the tapped item when showing the checkboxes and also how to simply deactivate the checkboxes when deselecting the last item?
    Thanks

  2. Answer
    Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 03 Sep 2014 Link to this post

    Hello Martin,

    Thank you for the question.

    You can use the IsCheckModeActiveChanged event to detect when the checkboxes are being displayed and add the tapped item to the CheckedItems collection. With the ItemCheckedStateChanged event, you can see when an item has changed its checked state and if the the CheckedItems collection is empty, you can hide the checkboxes. I have attached a sample project for demonstration.

    I hope this helps. Please, let us know if you have further questions.

    Regards,
    Rosy Topchiyska
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Martin
    Martin avatar
    18 posts
    Member since:
    May 2014

    Posted 05 Sep 2014 Link to this post

    Hi,
    thanks for the reply. I've implemented it this way and it works fine.
    It will be probabaly useful to add this hint to RadDataBoundListBox web documentation as well?
  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 10 Sep 2014 Link to this post

    Hi Martin,

    I'm glad that the solution worked for you and thank you for the feedback. I will contact our documentation team.

    Regards,
    Rosy Topchiyska
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top