RadTreeNode CustomTemplate drag n drop

1 posts, 0 answers
  1. Peter
    Peter avatar
    5 posts
    Member since:
    Jun 2012

    Posted 25 Jul 2013 Link to this post

    How to allow to drag node when i start dragging from hyperlink?
    This is my template for nodes...

    public class TreeNodeTemplate : ITemplate
    {
        public void InstantiateIn(Control container)
        {
            Telerik.Web.UI.RadTreeNode node = (Telerik.Web.UI.RadTreeNode)container;
            if (!string.IsNullOrEmpty(node.NavigateUrl))
            {
                HyperLink hl = new HyperLink();
                hl.Text = node.Text;
                hl.NavigateUrl = node.NavigateUrl;
                hl.CssClass = "rtIn";
                container.Controls.Add(hl);
            }
            else
            {
                Label label1 = new Label();
                label1.Text = node.Text;
                container.Controls.Add(label1);
            }
        }
    }
Back to Top