Hello Wen,
Thank you for interest in our demo.
RadGrid supports drag and drop functionality out of the box.
You can use it to achieve your goal. Please see our online example -
Items Drag And Drop
Also you can read our help article for more details -
Drag and drop of grid items
If you use this functionality of RadGrid you can cancel the dragging for certain rows by hooking on the
OnRowDragStarted event set eventArgs.set_cancel(true) to cancel.
In the Scheduler Builder demo the dragging is disabled for these rows which are already dragged. To achieve this we have a column in the DataBase containing boolean value. If it is true the mousedown event is not attached to this row and it cannot be dragged.The code which implement that is in the
RadGridSessions_ItemDataBound event handler:
if (!(bool)(DataBinder.Eval(e.Item.DataItem, "Marked"))) |
{ |
e.Item.Attributes["onmousedown"] = string.Format("onMouseDown(event, this,{0})", DataBinder.Eval(e.Item.DataItem, "ID").ToString()); |
} |
Regards,
Rosi
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.