// "element" is a paraemter for the function. It represents "this" from the onMouseDown event of the item row
var draggedRowTD = element.getElementsByTagName("td")[0].innerHTML; // get first td
var re = new RegExp('\<input[^\>]*?\>','gi'); // check for input form element
if (draggedRowTD.match(re)) {
returnfalse;
}
The whole point was to stop dragging if the row is in edit mode. If it's not in edit mode it won't have an <input> in it. So I use regular expressions to find one in the first <td>'s innerHTML.
In my code behind, I set the event thusly...
PrivateSub RadGrid1_ItemCreated(ByVal sender AsObject, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
IfTypeOf e.Item Is GridDataItem Then
Dim dataItem As GridDataItem = TryCast(e.Item, GridDataItem)