Short example for MultiColumnListView DragAndDrop?

Hi there.
Im building an EditorTool that helps with managing assets in a bigger project. I now added a MultiColumnListView to display a list of assets and wanted to implement the ability to drag and drop these assets from this ListView into the Scene or Inspector.

Each item in the ListView has stored the assetPath, so Im trying to use the path for the drag. I used DragAndDrop.StartDrag() before but now in Unity 6 it is handled with BaseVerticalCollectionView.canStartDrag. The thing is I dont really know how to use it correctly and didn’t understand the example in the Unity Doc here: Unity Doc Example

Thats why im asking for a simple example of DragAndDrop for a MultiColumnListView to understand how I can implement it. Thanks a lot!

Hello!

These are callback that you need to implement to define the behaviour of dragging and dropping. There are 4 of them:

            listView.canStartDrag += () => { 
            // return true if you can always start dragging an item, otherwise, use an if statement if it depends on some condition. 
            };
            listView.setupDragAndDrop += args => {
            // this is called during the setup of dragging, so you have access to `args.draggedElement` and `args.startDragArgs.title` to store, and use later on handle drop of the dragged element.
            }
            listView.dragAndDropUpdate += args => {
            // gets called as you're dragging
            }
            listView.handleDrop += args => {
            // gets called on drop, you can return `DragVisualMode.Rejected` to stop the drop.
            }

Thank you for your answer!
But I have to confess that I find it hard to understand how I should use them.
The previous DragAndDrop had the functionality to drop assets into the scene or the inspector already implemented by itself. Is it the same with these callbacks?
Because I tried to do it like this now, but the handleDrop doesn’t seem to register when I drop the item outside of the ListView.

        multiColumnListView.canStartDrag += (evt) => true;
        multiColumnListView.setupDragAndDrop += args => OnSetupDragAndDrop(args, multiColumnListView);
        multiColumnListView.dragAndDropUpdate += args =>
        {
            Debug.Log(args.dragAndDropData.source);
            return DragVisualMode.Move;
        };
        multiColumnListView.handleDrop += args =>
        {
            //Drop Object into Scene or Inspector
            Debug.Log(args.dragAndDropData.unityObjectReferences);
            return DragVisualMode.Move;
        };
    }

    StartDragArgs OnSetupDragAndDrop(SetupDragAndDropArgs args, MultiColumnListView multiColumnListView)
    {
        var sample = args.draggedElement.Q<SampleData>();
        if(sample == null)
        {
            return args.startDragArgs;
        }

        var startDragArgs = new StartDragArgs(args.startDragArgs.title, DragVisualMode.Move);
        startDragArgs.SetGenericData(dragAsset.name, dragAsset);
        return startDragArgs;   
    }

For this test I saved the Object dropAsset and want to drag it and place it into the scene on drop.
I’m kind of a beginner in this and I’m really struggling here. I feel bad for asking again but what am I doing wrong and how do I use these callbacks correctly?