Hide drag&drop indicator

Hello,
I have SfDataGrid with this setup:
  • AllowDraggingRows="True"
  • AllowDrop="False"
(I want to be able to drag items out of SfDataGrid to another control)

But I still can see drag&drop indicator in SfDataGrid. Is there a way to hide it? Why it is not hidden by default when  AllowDrop="False"?

Thank you

Ondřej Svoboda

4 Replies

JG Jai Ganesh S Syncfusion Team June 7, 2018 05:54 PM UTC

Hi Ondrej, 
 
You can achieve your requirement to hide the dragging indicator when the AllowDrop is false by override the ProcessOnDragOver method like below, 
 
protected override void ProcessOnDragOver(DragEventArgs args, RowColumnIndex rowColumnIndex) 
{ 
    if (args.Data.GetDataPresent("ListViewRecords")) 
        draggingRecords = args.Data.GetData("ListViewRecords") as ObservableCollection<object>; 
    else 
        draggingRecords = args.Data.GetData("Records") as ObservableCollection<object>; 
 
    if (draggingRecords == null) 
        return; 
 
    //To get the dropping position of the record 
    var dropPosition = GetDropPosition(args, rowColumnIndex, draggingRecords); 
 
    //To Show the draggable popup with the DropAbove/DropBelow message 
    ShowDragDropPopup(dropPosition, draggingRecords, args); 
 
    //To Show the up and down indicators while dragging the row 
    if (this.DataGrid.AllowDrop) 
        ShowDragIndicators(dropPosition, rowColumnIndex, args); 
 
    args.Handled = true; 
} 
 
 
Regards, 
Jai Ganesh S 



OS Ondrej Svoboda June 8, 2018 11:29 AM UTC

Thanks, works great.

Is there a way to localize DragDropPopup, I dont see the texts in Syncfusion.SfGrid.WPF.resx downloaded from here https://help.syncfusion.com/wpf/sfdatagrid/localization?

Regards
Ondřej Svoboda


JG Jai Ganesh S Syncfusion Team June 11, 2018 05:58 AM UTC

Hi Ondrej, 
 
We regret to inform you that, we don’t have a support to localize the DragDropPopup in our previous versions. However, now we have implemented the localization support for the DragDropPopup. It will be included in our upcoming Volume 2 main release 2018 and it will be available on mid of the June, 2018. 
 
Regards, 
Jai Ganesh S


JG Jai Ganesh S Syncfusion Team July 13, 2018 11:01 AM UTC

Hi Ondrej,  
 
We have included the Localization for drag and drop strings only in our latest version (16.2.0.41). Can you please upgrade to this version to make use of this feature.   
 
 
Regards, 
Jai Ganesh S 


Loader.
Up arrow icon