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

ItemReorder in Grouped List

4 Answers 118 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Johannes
Top achievements
Rank 1
Johannes asked on 01 Mar 2017, 05:12 PM

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!

4 Answers, 1 is accepted

Sort by
0
Johannes
Top achievements
Rank 1
answered on 01 Mar 2017, 05:20 PM

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.

0
Accepted
Pavel R. Pavlov
Telerik team
answered on 06 Mar 2017, 09:48 AM
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
0
Johannes
Top achievements
Rank 1
answered on 07 Mar 2017, 08:11 AM

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

0
Pavel R. Pavlov
Telerik team
answered on 07 Mar 2017, 09:52 AM
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
Tags
ListView
Asked by
Johannes
Top achievements
Rank 1
Answers by
Johannes
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or