Hi!
I have a case where I want to disable Drag and Drop based on whether the user is accessing my site from a laptop or mobile device. If it's Mobile, I want to disable it.
I thought that the OnInit event would be the right place to do this. Could someone point me in the right direction for this?
TIA!
I have a case where I want to disable Drag and Drop based on whether the user is accessing my site from a laptop or mobile device. If it's Mobile, I want to disable it.
I thought that the OnInit event would be the right place to do this. Could someone point me in the right direction for this?
TIA!
protected void ItemTree_Init(object sender, EventArgs e)
{
var browsersniff = Request.Browser;
if (browsersniff.IsMobileDevice == true)
{
this.ItemTree.EnableDragAndDrop = false;
this.ItemTree.EnableDragAndDropBetweenNodes = false;
}
}
(Edit: I should add that the code above does get hit when I run on the debugger. It just isn't disabling Drag/Drop)