Need More Info
Last Updated: 25 Apr 2023 04:01 by ADMIN
Peter
Created on: 18 Apr 2023 07:41
Category: UI for Blazor
Type: Feature Request
1
Drag & Drop Between Components Not Sharing the Same Data Model

Good Day,

I really like the ability to drag and drop between controls. I though feel very limited, by Telerik enforcing both controls to have the same underlying data model (or interface) as per this article.

How to Drag and Drop Different Models between Multiple Grids - Telerik UI for Blazor

What would really be great, if the "OnRowDrop" event could accept other data models. I have no particular view on how exactly this should be implemented. It should work for server and WASM environments.

An example could be, that the "dragged" row is of type object and not <TItem> and it is left to implementation code deal with different data models being dropped on the control.

        //Something like this

        private void OnRowDropHandler(GridRowDropEventArgs args)

        {
            if(args.Item is IParentSampleData)
            {
                GridData1.Remove((IParentSampleData)args.Item);
                InsertItem((IParentSampleData)args);
            }
            else if (args.Item is SomeOtherModel)
            { 
                 //Whatever is needed...
            }
        }

Kind regards,

Peter

 

1 comment
ADMIN
Dimo
Posted on: 25 Apr 2023 04:01

Hello Peter,

We support drag and drop between different components with different model types. Do you need anything different and what exactly?

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.