Welcome Guest Search | Active Topics | Sign In | Register

TreeView - Apostrophe Options
mburolla
Posted: Friday, May 1, 2009 4:57:20 PM
Rank: Advanced Member
Groups: Member

Joined: 4/13/2009
Posts: 37
I just noticed something weird with the treeview. When I have a node whose name has an apostrophe in it, the drag and drop feature locks up (kinda). My drag and drop works GREAT for ALL other nodes. Is there an issue with nodes that contain an apostrophe in them?

Thanks,
Marty
eo_support
Posted: Friday, May 1, 2009 6:28:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

No. We are not aware of any issues regarding apostrophe. Can you create a test page that demonstrates this problem?

Thanks!
mburolla
Posted: Monday, May 4, 2009 9:50:11 AM
Rank: Advanced Member
Groups: Member

Joined: 4/13/2009
Posts: 37
Here's my treeview:

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tree.aspx.cs" Inherits="JungleDiskUI2.tree" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <eo:TreeView runat="server" ID="TreeView1"  AutoExpandOnClick="false"
        ControlSkinID="None" Height="330px" onitemclick="TreeView1_ItemClick" 
        OnItemPopulate="TreeView1_ItemPopulate" Width="318px" AllowDragDrop="True">
        <LookNodes>
            <eo:TreeNode CollapsedImageUrl="00030301" 
                DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;" 
                ExpandedImageUrl="00030302" ImageUrl="00030301" ItemID="_Default" 
                NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 1px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none" 
                SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
            </eo:TreeNode>
            <eo:TreeNode CollapsedImageUrl="00101022" 
                DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;" 
                ExpandedImageUrl="00101022" ImageUrl="00101022" ItemID="_FileNode" 
                NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 1px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none" 
                SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
            </eo:TreeNode>
        </LookNodes>
        <TopGroup Style-CssText="border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:black;cursor:hand;font-family:Tahoma;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;">
        </TopGroup>
    </eo:TreeView>
    
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    
    </div>
    </form>
   
</body>
</html>



Here's the code behind:

Code: C#
public partial class tree : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
				EO.Web.TreeNode tn = new EO.Web.TreeNode("root");
				tn.PopulateOnDemand = true;
				tn.RaisesServerEvent = NullableBool.True;
				tn.ItemID = "root";
				tn.AllowDrag = NullableBool.True;
				tn.AllowDrop = NullableBool.True;
				this.TreeView1.TopGroup.Nodes.Add(tn);
            }
        }

        protected void TreeView1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
        {
            Label1.Text = "Path: " + e.TreeNode.Path;  
        }

        protected void TreeView1_ItemPopulate(object sender, EO.Web.NavigationItemEventArgs e)
        {
			// Create directories...
			foreach (string s in CreateDir(e.TreeNode.ItemID))
			{
				EO.Web.TreeNode newNode = new EO.Web.TreeNode(s);
				newNode.ItemID = s;
				newNode.PopulateOnDemand = true;
				newNode.AllowDrag = NullableBool.True;
				newNode.AllowDrop = NullableBool.True;
				e.TreeNode.ChildNodes.Add(newNode);
			}

			// Create files...
			foreach (string s in CreateFiles(e.TreeNode.ItemID))
			{
				EO.Web.TreeNode newNode = new EO.Web.TreeNode(s);
				newNode.ItemID = s;
				newNode.PopulateOnDemand = false;
				newNode.LookID = "_FileNode";
				newNode.AllowDrag = NullableBool.True;
				newNode.AllowDrop = NullableBool.False;
				e.TreeNode.ChildNodes.Add(newNode);
			}
        }
		
        private List<string> CreateDir(string dirName)
        {
            List<string> retval = new List<string>();

            switch (dirName)
            {
				case "root":
                    retval.Add("Directory 1");
					break;
				case "Directory 1":
                    retval.Add("Directory 2");
					break;
                case "Directory 2":
					retval.Add( "Directory 3" );
					break;
                case "Directory 3":
                    retval.Add("Directory 4");
                    break;
			}

            return retval;
        }

        private List<string> CreateFiles(string dirName)
        {
            List<string> retval = new List<string>();

            switch (dirName)
            {
				case "root":
                    retval.Add("File'1");
                    retval.Add("File 1");
					break;
				case "Directory 1":
					retval.Add("File'2");
                    retval.Add("File 2");
					break;
				case "Directory 2":
                    retval.Add("File'3");
                    retval.Add("File 3");
					break;
                case "Directory 3":
                    retval.Add("File'4");
                    retval.Add("File 4");
                    break;
			}

            return retval;
        }
    }



Here are the steps to reproduce the badness:

User Action: Click on the "+" to expand the root node (let go of the mouse button).
User Action: Click on "File'1" (let go of the mouse button).
User Action: Move the mouse pointer.
Result: The "File'1" will move and lock up the tree.

This process works fine for "File 1" (without the apostrophe).

I'm running this on Firefox 3.0.10.

Thanks,
Marty


eo_support
Posted: Monday, May 4, 2009 9:58:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have confirmed this to be a bug. You can use apostrophe in TreeNode.Text, but can not use it with TreeNode.ItemID. Since you use it with ItemID, it causes problem for you. We will be fixing this problem shortly and provide you a new build along with changes for drag and drop scrolling issue you have reported.

Thanks!
mburolla
Posted: Monday, May 4, 2009 10:04:02 AM
Rank: Advanced Member
Groups: Member

Joined: 4/13/2009
Posts: 37
Great! Thanks for your help.

Marty
eo_support
Posted: Tuesday, May 5, 2009 1:23:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
This issue has been fixed in build 2008.0.77.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.