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

TreeView breaks if I click quickly

1 Answer 58 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
T
Top achievements
Rank 1
T asked on 23 Feb 2009, 04:55 PM
We have little complex page with TreeView. On 'right click' of the node we are displaying the appropriate context menu as per the selected node. The context menu items can be enable/disable depending upon the type of node, we are controlling this via javascript.

The issue which we are facing is: If I right click on one of the tree node and choose one of the context menu item; then try to right click on different tree node, getting the following error:

'this._originalDomPositionHelper.parentNode' is null or not an object.

After we got this error the context menu is completely gone and in order to get it back we have to 'refresh' the page or start the application in new browser window.

I have tried this several times and seems like the RadTreeView's OnClientContextMenuShowing event takes around 5 seconds to build the context menu. We are managing enable/disable state for context menu item via javascript which is being called from OnClientContextMenuShowing but that javascript is pretty light.

Is there a way that we can build the context menu quicker? We can't have wait time ~5 seconds for our users.

Any help will be greatly appreciated.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 25 Feb 2009, 09:24 AM
Hello T,

Are you rebuilding the entire context menu on each right click? This can get slow if the context menu has many items. A better approach would be to create the context menu only once and then simply hide/show the needed menu items using menuItem.set_visible(false).

You may also try disabling the context menu animation.

If neither of these work for you, it would be great if you can send us a sample project that shows the problem so we can see your scenario and propose an adequate solution.

Best wishes,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
T
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or