I have two treeviews (left and right). Our client want to prevent a user from dragging certain types of items from left or right, but to avoid confusion on their part, does not want left to have any items suppressed. I have the check in the drop handler to see if the node should not be able to be dropped, and it works. The only problem is that I'm trying to show a rad alert when I stop the drop from happening, but I cannot get it to pop:
The code does get written to the page, I've verified this with fidler, but for some reason it is not popping up.
<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="left"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="left" LoadingPanelID="alpT" /> <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="alpT" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="right"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="alpT" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy>...<telerik:RadTreeView ID="right" BorderColor="Black" BorderWidth="1px" OnClientContextMenuItemClicked="ContextMenuClick" runat="server" OnNodeDrop="HandleDrop" OnNodeEdit="HandleNodeEdit" OnNodeExpand="right_NodeExpand" EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" Height="475px" Width="350px" meta:resourcekey="trvResource1">...</telerik:RadTreeView>Protected Sub HandleDrop(ByVal sender As Object, ByVal e As RadTreeNodeDragDropEventArgs)... If ShouldNotDrop Then Dim strScript As String = "Sys.Application.add_load(function(sender, args) {if (!args.get_isPartialLoad()){radalert(""You cannot drop this here"");}});" Telerik.Web.UI.RadAjaxManager.GetCurrent(Me).ResponseScripts.Add(strScript) End If...End SubThe code does get written to the page, I've verified this with fidler, but for some reason it is not popping up.