This is a migrated thread and some comments may be shown as answers.

Node text cannot contain "("

7 Answers 82 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Relatics Systeembeheer
Top achievements
Rank 1
Relatics Systeembeheer asked on 05 Jun 2008, 03:35 PM
When you set the node text (client-side) with the following string "Node (a", you get an error and the tree becomes corrupt.

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 06 Jun 2008, 06:44 AM
Hello Bert Groenveld,

I couldn't reproduce the problem in our online examples. I tried this:

$find("RadTreeView1").get_nodes().getNode(0).set_text("Node (a");

Everything went fine - the text was updated and the treeview continued to work as expected.

Could you please give us more details how to reproduce the error?

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Relatics Systeembeheer
Top achievements
Rank 1
answered on 06 Jun 2008, 07:31 AM
Hi,

We use the release of 15-4-2008

This is the code we use. On the OnClientNodeEditedEventHandler we get the new text and offer it asynchronous to our database engine. When this call succeeds we set the text of the node with commit changes on.



function

OnClientNodeEditedEventHandler(sender, eventArgs)

{

var node = eventArgs.get_node();

var newValue = node.get_text();

var key = node.get_value();

var ctx = node;

ChangeObjectValue(key,

"Name" , newValue, eventArgs._node._originalText , myHelperID, onSuccess_ChangeObjectValue, onFailed_ChangeObjectValue, ctx);

}

function

onSuccess_ChangeObjectValue(serverResult, node, methodName)

{

if (serverResult.IsSuccessFul != true){

//terugzetten value

node.set_text(serverResult.Name);

}

else{

//servermodel bijwerken

var treeView = $find(RadTreeViewId);

var newText = node.get_text();

treeView.trackChanges();

//server should listen

node.set_text(newText);

treeView.commitChanges();

//server stops listening

var nodeKey = node.get_value();

processConnection(nodeKey);

}

displayMessage(serverResult.IsSuccessFul, serverResult.Message);

}

function

onFailed_ChangeObjectValue(ex, node, methodName)

{

displayMessage(

false,"Error");

}

0
Relatics Systeembeheer
Top achievements
Rank 1
answered on 06 Jun 2008, 07:45 AM
Hi,

Here some extra information. The debugger breaks at the following rule:

var

_64=new RegExp(this._originalText,"g");

I think this is javascript from Telerik?

0
Relatics Systeembeheer
Top achievements
Rank 1
answered on 06 Jun 2008, 08:07 AM
Hello,

I managed to reproduce this error in the online demo site. De demo I use is Treeview -> Using Client-Side API -> Client-Side events. This are the steps:

Case 1

  1. Select the node "Sent Items"
  2. Go to edit mode with F2
  3. Change node text in "Sent Items("
  4. Exit edit mode by hit Enter
  5. Select the node again
  6. Node automatically goed in edit mode
  7. Change node text in "Sent Items()"
  8. Exit edit mode by hit Enter
  9. Now you get the javascipt error: Expected ')' in regular expression
  10. next javascript error
  11. Node text not visible anymore

Case 2

  1. Select the node "Inbox (14)"
  2. Go to edit mode with F2
  3. Change node text in "Inbox (14) aaaa"
  4. Exit edit mode by hit Enter
  5. Now the old node text is displayed

Case 3

  1. Select the node "Sent Items"
  2. Go to edit mode with F2
  3. Change node text in "Sent Items()"
  4. Exit edit mode by hit Enter
  5. Select the node again
  6. Node automatically goed in edit mode
  7. Change node text in "Sent Items() aaa"
  8. Now the node text changes in "Sent Items() aaa()"

Success!

0
Dimitar Milushev
Telerik team
answered on 10 Jun 2008, 04:50 PM
Hi Bert Groenveld,

Please excuse me for the delayed answer.

Indeed tree node editing currently has some problems with certain non-alphanumeric characters. We are working to resolve the issue as soon as possible. The fix will be included in the next official release of RadTreeView, but if you would like to receive a custom build as soon as the problem is fixed, please open a support ticket and let us know.

I'm sorry for the inconvenience.

Best wishes,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
James Cerezo
Top achievements
Rank 1
answered on 09 Jul 2008, 03:12 AM
Is this issue fixed in version 2008.1.618.35?
0
Atanas Korchev
Telerik team
answered on 09 Jul 2008, 07:58 AM
Hi James Cerezo,

This bug is fixed in our official SP2 release (2008.1.619.35). Please download it from your account and give it a try.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Relatics Systeembeheer
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Relatics Systeembeheer
Top achievements
Rank 1
Dimitar Milushev
Telerik team
James Cerezo
Top achievements
Rank 1
Share this question
or