RadControls for ASP .NET AJAX version
Q3 2010 and later
3.5 and later
|Visual Studio version
2008 and later
all browsers supported by RadControls for ASP .NET AJAX
RadGrid for ASP.NET AJAX provides a handy Items Drag-and-Drop
functionality that allows you to drag items in or between RadGrid instances. As a visual indication of the dragged items, RadGrid creates copies of the selected items and moves them along with the mouse cursor on mouse move. This project demonstrates how the dragged content attached to the mouse cursor can be customized using an ExtenderControl
attached to RadGrid.
control that implements this behavior provides the DragContentTemplate
that allows you to define arbitrary content to be shown when grid items are dragged. This content is initially rendered hidden and shown upon dragging items from the RadGrid instance the extender is attached to. The CursorOffsetLeft
properties specify the position of the dragged content relative to the mouse cursor.
On the client, GridCustomDragExtender
fires 2 events: dragContentCreating
. You can register event handlers for them through the extender's server-side OnClientDragContentCreating
properties, respectively. OnClientDragContentCreating
is fired each time item drag is started before the custom content specified in DragContentTemplate
is shown on the page. In the event handler, you can access the dragged items collection and the content panel that contains your dragged content. This mechanism can be used to set any item-specific data inside the dragged content before it is rendered on the page. OnClientDrag
is fired with each mousemove
event during item drag.
provides a handy approach for defining and databinding custom drag content when dragging items in RadGrid.