Reputation: 1056
I have a radgrid which should update when a checkboxlist is changed(achieved on a on selected event which is triggered by AutoPostBack) however when I check a checkbox in the list the RadAjaxLoading picture will work correctly to display the loading image over where the RadGrid is however it will never go away and re-display the grid. According to console errors in my web browser, I keep getting a error of:
Uncaught TypeError: Object [object Object] has no method '_destroyTree'
This is how i've set up my manager if it helps at all:
<telerik:RadAjaxManager ID="RadAjaxManagerNotesView" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGridNotes">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridNotes" LoadingPanelID="RadAjaxLoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="CheckBoxListCategories">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridNotes"
LoadingPanelID="RadAjaxLoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Can anybody help me solve this error? The RadGrid will never be re-displayed as of current
Upvotes: 2
Views: 1919
Reputation: 379
This script solved my problem:
function _destroyTree2(element) {
if (element.nodeType === 1) {
var childNodes = element.childNodes;
for (var i = childNodes.length - 1; i >= 0; i--) {
var node = childNodes[i];
if (node.nodeType === 1) {
if (node.dispose && typeof (node.dispose) === "function") {
node.dispose();
}
else if (node.control && typeof (node.control.dispose) === "function") {
node.control.dispose();
}
var behaviors = Sys.UI.Behavior.getBehaviors(node);
for (var j = behaviors.length - 1; j >= 0; j--) {
behaviors[j].dispose();
}
this._destroyTree(node);
}
}
}
}
Sys.WebForms.PageRequestManager.getInstance()._destroyTree = _destroyTree2
Put it on the end of the page.
Upvotes: 3
Reputation: 1056
Found the error to be an incompatibility with .NET 4.0 and an old version of telerik(2009) managed to get around the error by using the following patch in a separate JavaScript file and including it in the footer of my master page.
http://www.telerik.com/ClientsFiles/203221_default.zip
Upvotes: 4