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"; //<-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·)