Disallow Unselect

4 posts, 1 answers
  1. Bruce
    Bruce avatar
    34 posts
    Member since:
    Oct 2010

    Posted 23 May 2017 Link to this post

    I need to always have a row selected.  Therefore, I need to disallow or stop the de-selection of the currently-selected row.  The SelectionChanged event fires twice, once for the old Item being removed from SelectedItems and another for adding the new Item to SelectedItems.

    I thought of attempting to use ItemTapped in conjunction with SelectionChanged but a) I also need to be able to select a row programmatically and b) the ItemTapped even fires sporadically on iOS.  Sometimes a tap will fire it; sometimes it won't.

     

    I'm in SelectionMode=Single.

  2. Answer
    Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    586 posts

    Posted 25 May 2017 Link to this post

    Hello Bruce,

    Thank you for contacting us.

    You can use the SelectedItems collection to programmatically select items. I have attached a sample that demonstrates this. Unfortunately, this will work on iOS only because we have an issue on Android where the selection is not properly updated when we modify the SelectedItems collection. I have raised the priority of the issue and the fix should be available in the next internal build.

    You mentioned that the ItemTapped event does not always work on iOS, but I couldn't reproduce this issue. It could be something that is specific to your setup, could you please send us an example?

    I look forward to your reply.

    Regards,
    Rosy Topchiyska
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Bruce
    Bruce avatar
    34 posts
    Member since:
    Oct 2010

    Posted 13 Jun 2017 in reply to Rosy Topchiyska Link to this post

    I attempted to do something similar, but as you said, it does not work on Android and hence, is not an acceptable solution.  I'll continue to look for a fix.

    I'll also see if I can create a separate project duplicating the iOS ItemTapped issue.

  4. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    665 posts

    Posted 15 Jun 2017 Link to this post

    Hello Bruce,

    With the R2 SP 2017 release which is available as of yesterday, we have included a fix for the issue you are observing in Android. However, there is another undesired behavior we have diagnosed which can be replicated on devices that use 6.0 or later Android version(sometimes the items do not appear as selected although they actually are). We should have a fix for that with the next minor build(next Friday). With this in mind, I suggest you test the approach my colleague has suggested for devices that use a lower version of Android and wait until next Friday to test the higher versions.

    Have a great rest of the week.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top