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

[Solved] Context Menus rename & delete

1 Answer 225 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 05 Feb 2008, 04:52 PM

I am trying (somewhat unsuccessfully) to replicate Context Menu functionality from the ASP.NET version.

Delete
In the older version, it was possible to prompt the user in Javascript before deleting a node and cancel the request:

if (itemText == "Delete")
{        
    return confirm("Are you sure?");

In the Prometheus version, I can ask the question, but the node is deleted irrespective of the answer.

Rename
Although I can edit the Node using F2, I would also like to have a 'Rename' option on a Context Menu. In the ASP.NET version, this was easily accomplished:

if (itemText == "Rename")
   {     
      node.StartEdit();
   }

With Prometheus controls, similar code puts the node briefly into edit mode, but then returns to normal almost immediately

Can you let me know how I can get round these problems?

Cheers

paul

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar Milushev
Telerik team
answered on 07 Feb 2008, 12:19 PM
Hello Paul,

I'm attaching a sample project that demonstrates implementing the desired functionality with RadTreeView Prometheus. It shows how to use the set_cancel() method to cancel client-side events.

All the best,
Dimitar Milushev
the Telerik team

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