Hi,
I'm using two TelerikListBox elements, one left, one right. The right ones Data attribute is bound to already selected items that I get from the DB through EF Core. As you know, EF Core makes use of navigation properties. As you probably also know, the TelerikListBox recursively copies elements on binding. This causes a documented StackOverflowException, as written here -> https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-stackoverflowexception-editing-circular-references.
I fixed the issue by calling
.Select(x => x.RemoveNavigation())
before binding, with RemoveNavigation being a simple "NavigationProp = null; return this;" function.
Eventhough this works, I think
a) the documented solution is not great, because the navigation properties are very useful, are one of the big reasons to even use EF Core in the first place and are automatically generated by, for example, EF Core Power Tools. Expecting the users to remove them from affected models is not a viable long term solution.
b) it would be better for Telerik to fix the issue by implementing some kind of logic to prevent the issue alltogether. My suggestion would be to ignore virtual, non-collection object properties on copy.
When I use control TelerikListBox with draggable mode (draggable="true") I need to provide drag handle selector "Draggable tag" which user will use for snap and move item.
Can I pass draggable handle selector? Where I will pas css class of the handle which will use form sort/move/drag items.
I need to restrict users use any other place of "Draggable item" - just specific place like handle Icon.
Hi,
Last week, I started exploring the Telerik for Blazor library, and I’ve been working with the ListBox component that facilitates drag-and-drop functionality within and between lists. While the drag-and-drop feature works well, I noticed that there’s no visual drop indicator to show where an item will be placed when dropped within the list.
Is there a built-in solution or a recommended approach to implement a drop indicator for this scenario?
I’ve attached an image that shows a list with an item being dragged, and I’ve highlighted where I would like the drop indicator to appear.
Thanks in advance for your help.
Best regards,
Mika
Is there a way to designate which element is the area to start a drag?
=====ADMIN EDIT=====
In the interim, as an alternative approach, you have the option to specify the drag handle element using JavaScript to selectively disable the dragging functionality for all elements within the ItemTemplate, except for the intended drag handle. Here is an example: REPL link.
I have a ListBox on the same page as an Editor. I want to drag items from the ListBox to the Editor. Currently, it is not possible to drag items outside of the ListBox.
The drag events will also allow me to get the dragged item, so I can remove it from the ListBox's data when the user drops it in the Editor.
Please expose OnDragStart / OnDrag events to allow me to achieve that. Also, enhance the OnDrop event to allow dropping items outside of the ListBox.