ItemReorder in Grouped List

5 posts, 1 answers
  1. Johannes
    Johannes avatar
    3 posts
    Member since:
    Mar 2017

    Posted 01 Mar Link to this post

    I would like to have a ListView grouped by a property indicating active and inactive items. The user is supposed to be able to activate items by dragging them from the group of inactive items to the group of active items. And the user needs to be able to change the order of active items.

    Is this possible and if yes how?

    In my tests so far I've build an ObservableCollection of items. And grouped the ListView by a string property called "Status".

    I can drag Items inside each of the groups. But when I drag an item from one group to the other it gets sorted back to the original group. I guess its because its "Status" Property would need to be updated. But how?

    Thanks!

  2. Johannes
    Johannes avatar
    3 posts
    Member since:
    Mar 2017

    Posted 01 Mar in reply to Johannes Link to this post

    Oh, so far I only tested under Android. In iOS if I drag items in a grouped list, the groupheaders do not adjust position. The UI get's messed up. I guess that's a show stopper anyway.

  3. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1237 posts

    Posted 06 Mar Link to this post

    Hi Johannes,

    You are right for the behavior of the component. At the moment of writing the RadListView does not support ItemReordering in grouped scenario. This is why I logged a bug in our backlog system and updated your Telerik account accordingly.

    On the other hand, we have already logged a Feedback Item to expose events for this functionality. These events will allow customers to implement their requirements. Please give your vote for the item as this will help us to evaluate the demand of this feature.

    Regards,
    Pavel R. Pavlov
    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
  4. Johannes
    Johannes avatar
    3 posts
    Member since:
    Mar 2017

    Posted 07 Mar in reply to Pavel R. Pavlov Link to this post

    Thank you for the confirmation, that this is currently not possible. Since drag&drop was the only reason we evaluated Telerik Ui for Xamarin we have since moved on. Currently we use a standard grouped ListView in Xamarin Forms and added up / down arrows. It's really ugly. If you can think of another way our goal of activating and sorting items could be solved we would be really interested. 

    Thanks

    Johannes

  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1237 posts

    Posted 07 Mar Link to this post

    Hello Johannes,

    Since the drag and drop functionality will not fit your scenario, you could try using the Cell Swipe gesture to move the items in different groups. In the ItemSwipeContentTemplate you can use buttons that will change the grouping property of the underlying business item. When this is done you will be able to refresh the group descriptor of the RadListView in order to update the UI and visually move the respective item in the new group.

    For your convenience we prepared a simple project demonstrating this approach. Please take a look at it and let us know if it fits your scenario.

    Regards,
    Pavel R. Pavlov
    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
Back to Top