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

Handler was not added through the Sys.UI.DomEvent.addHandler method

3 Answers 79 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Charles Forsyth
Top achievements
Rank 2
Charles Forsyth asked on 18 Sep 2008, 09:38 PM

I have a content page, that utilizes a simple MasterPage built with Visual Studio 2008 Pro.

Within the content page I have a RadTreeView and a DetailsView control.

The RadTreeView is bound to a SQL data source.

The RadTreeView is set up as a master/details for the DetailsView.

I have drag and drop configured between nodes to allow the user to re-order nodes (server side).

I have set up a ScriptManagerProxy and RadAjaxManagerProxy on the page.

The page works great. Until you try to leave.

When you close the browser, refresh the page or try to open a new page the following JavaScript error occurs:

Line: 3014
Error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

I've read other posts here for other controls that exhibit the same symptoms. The solutions they were given was to download the latest version because that bug was fixed in the new version of the control in question (not RadTreeView).

However, I believe I have the latest version. I installed RadControls for ASP.Net AJAX 2008 2.826

Is there anything I can do to fix this?  I have spent over 30 hours getting this RadTreeView to work, I'd rather not abandon it because of a stupid JavaScript bug.

3 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 19 Sep 2008, 11:06 AM
Hi Charles Forsyth,

RadTreeView should work properly in the described case. Can you please open a support ticket and send us a sample project that reproduces the issue so we can debug it locally and provide a proper solution for the problem?

Sincerely yours,
Dimitar Milushev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Charles Forsyth
Top achievements
Rank 2
answered on 19 Sep 2008, 08:35 PM
I re-created the entire interface from scratch and tested along the way until I could reproduce the error.

The problem seemed to be with RadAjaxManagerProxy, when I selected a particular parent panel as a "to update" control.

This parent panel was hooked up to a ModalPopupExtender.

This is all necessary because when the user selects the "delete"
context menu item from the main RadTreeView, a popup needs to open and display a list of items to allow the user to select a replacment record for the record being deleted. (to avoid orphaned records in other tables).

I created a User Control (my first) that contains a RadTreeView control, a HiddenField control and a TextBox. The textbox is hooked up to a DropDownExtender control so when the user clicks the Textbox it becomes a drop-down list that contains a RadTreeView so the user can then browse and select a hierarchical record.

When the data changes in the main RadTreeView I need to make sure the RadTreeView in my UserControl gets updated too. But I was unable to select my User Control in the RadAjaxManagerProxy. So instead I selected a parent container of that control.

That is when the error occurs.

To fix the problem I came down one parent and select the immediate parent control instead of the entire parent wrapper panel control.

However, I do have a side question, is there a way I can make my User Control visible in the RadAjaxManagerProxy smart tag interface?


0
Nikolay Rusev
Telerik team
answered on 24 Sep 2008, 07:42 AM
Hi Charles,

Unfortunately you are right in you observation that RadAjaxManagerProxy doesn't show user control in content page. This issue is because of Visual Studio implementation.
I suggest you to wrap your UserControl in Panel server control to see it in RadAjaxManagerProxy designer.

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Charles Forsyth
Top achievements
Rank 2
Answers by
Dimitar Milushev
Telerik team
Charles Forsyth
Top achievements
Rank 2
Nikolay Rusev
Telerik team
Share this question
or