Welcome Guest Search | Active Topics | Sign In | Register

ClientSideOnNodeRename making Node rename fail Options
Luis Angel
Posted: Wednesday, November 5, 2008 12:58:42 AM
Rank: Member
Groups: Member

Joined: 2/25/2008
Posts: 14
Hi,
I've been using the TreeView's ClientSideOnNodeRename client function for several a months.
But, after the last update the ClientSideOnNodeRename function is not working properly.

To test the problem I've created a simple web page with a treeview. This is what I have:
This is the test page .aspx.
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Seguridad_Default2" %>

<!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>
      <script type="text/javascript">
        function FormatNodeText(treeview, node, newText) {
          alert(newText);
          return true;
        }
    </script>
    <eo:TreeView ID="tvw" runat="server" />
    </div>
    </form>
</body>
</html>

As you can see there is a javascript function, that should get the renamed node show it with an alert.

This is the server code:

Code: C#
public partial class Seguridad_Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadTree();
    }

    private void LoadTree()
    {
        tvw.AllowEdit = true;
        tvw.Nodes.Add(new EO.Web.TreeNode("ASimpleNodeText"));

        //tvw.ClientSideOnNodeRename = "FormatNodeText"; //&lt;-Here is the problem
    }
}

In this sample I only create a treenode and set the treenode to allow node editing.
If I let the code as is it works corretly. I can rename the treenode without problem.
The problems start when I uncomment the "tvw.ClientSideOnNodeRename = "FormatNodeText";" line.
With this line I'm trying to define, as the documentation says, a client function to be called AFTER the rename has been done. And this has been the true until the last update.
Now, when I set "ClientSideOnNodeRename", the javascript function is called BEFORE the node edit is done, and is allways sending then "newText" parameter with a "undefined" value.
I think the problem may be that the code is treating the "ClientSideOnNodeRename" the same as the "ClientSideOnNodeRenaming" function...

My Eo.Web.dll is:
·version: 6.0.44.2
·Modify Date: 10/16/2008

Thanks is advance for your help 8·)
eo_support
Posted: Wednesday, November 5, 2008 7:24:08 AM
Rank: Administration
Groups: Administration

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

We have posted a new build that fixed this issue. Please see your private message for download location.

Thanks!
Luis Angel
Posted: Thursday, November 6, 2008 4:02:20 AM
Rank: Member
Groups: Member

Joined: 2/25/2008
Posts: 14
Hi,

Thank you for this really fast answer and solution! 8·)

It works great with this new update. Thank you very much!



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.