We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Drag & Drop inside SfListView in UWP with mouse

I'm currently trying to implement Drag&Drop for a SfListView where dragging should start while pressing a specific Label (with FontAweSome Icon).
It seems there isn't happening anything when running this on UWP Desktop.

I tried DragStartMode="OnDragIndicator" but nothing ever happens.


Here's the code snipped with the DragIndicatorView:

                    <syncfusion:SfListView x:Name="listView" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
                    ItemsSource="{Binding Properties.Unterkategorien}"
                    InputTransparent="False"
                    AutoFitMode="DynamicHeight"
                    DragStartMode="OnDragIndicator,OnHold"  
                    ItemSize="350">
                        <syncfusion:SfListView.LayoutManager>
                            <syncfusion:GridLayout SpanCount="2" />
                        </syncfusion:SfListView.LayoutManager>
                        <syncfusion:SfListView.ItemTemplate>
                            <DataTemplate x:Name="ItemTemplate">
                                <ViewCell>
                                    <ViewCell.View>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                            </Grid.ColumnDefinitions>
                                            <usercontrols:UnterkategorieBox Grid.Column="0" Grid.Row="0" Unterkategorie="{Binding .}" />
                                            <syncfusion:DragIndicatorView Grid.Column="0" Grid.Row="0" ListView="{x:Reference listView}" 
                    HorizontalOptions="Start" 
                    VerticalOptions="Start">
                                                <Label x:Name="ReorderIcon" Margin="10,10,0,0" HorizontalOptions="StartAndExpand" HorizontalTextAlignment="Start" VerticalTextAlignment="Start" VerticalOptions="StartAndExpand"  FontFamily="{StaticResource fontAwesomeSolid}" TextColor="{StaticResource colorObiWeiss}" Text="&#xf0b2;" FontSize="36" />
                                            </syncfusion:DragIndicatorView>
                                        </Grid>
                                    </ViewCell.View>
                                </ViewCell>
                            </DataTemplate>
                        </syncfusion:SfListView.ItemTemplate>
                    </syncfusion:SfListView>



I've enclosed a ZIP with a screenshot on how the item looks like (8 items and they all have the move icon on top left).

Attachment: Bildschirmfoto_20200220_um_10.40.51.png_a843acbb.zip

2 Replies

AO Andreas Oelke February 20, 2020 12:10 PM UTC

So I found out that using GridLayout is the problem.

Is there any other way to use drag and drop in a grid design and not only one single colum with items because it is mandatory for our Apps?


LN Lakshmi Natarajan Syncfusion Team February 21, 2020 11:43 AM UTC

Hi Andreas , 
 
Thank you for using Syncfusion products. 
 
We have analyzed and considered your requirement of “Drag and Drop in GridLayout” in SfListView and already logged feature request for the same. We will prioritize the features every release based on the demands and we do not have immediate plan to implement this feature since we committed with already planned work. So, this feature will be available any of our upcoming release. 
 
  
Note: The provided feedback link is private, you need to login to view this feedback. 
 
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count. 
 
Regards, 
Lakshmi Natarajan 


Loader.
Live Chat Icon For mobile
Up arrow icon