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

Javascript Error in _setExpanded of RadPanelItem after i cancel an insert in a radgrid

4 Answers 45 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Sophie
Top achievements
Rank 2
Sophie asked on 01 Mar 2013, 04:59 PM
Hello,
I have a radgrid under my RadPanel. When i cancel the insert command, i get this javascript error if i try to expand my RadPanel:
( Object doesn't support this property or method)

The first error is from telerik _setExpanded function, happening on _setChildrenHeight(""):
_setExpanded:function(k,i,n){if(!this._getAnimationContainer()||!this.get_isEnabled()){return;
}var o=this.get_panelBar();
var j=this._getAnimatedElement();
var f=this.get_parent();
if(o._transitionAnimationIsInProgress){return;
}if(k){if(this.get_expanded()){return;
}if(this.get_level()==0&&o.get_fullExpandedItem()){if(window.netscape&&!window.opera){j.style.overflow="hidden";
this._changedOverflow=true;
}j.style.height=o._getGroupHeight()+"px";
if(window.netscape&&!window.opera){j.style.overflow="auto";
this._changedOverflow=false;
}}j.style.display="none";
j.style.width="100%";
if(this.get_level()>0&&!o.get_fullExpandedItem()){f._setChildrenHeight("");

If i put a spy on the f variable, there's no setChildrenHeight in that item.
Here are some propreties that might help to find what's wrong:
_childTypeName = "Telerik.Web.UI.RadPanelItem"
_childControlsCreated = true
_childListElement = {object} -> i see all my list element when i look at the innerHTML, so they are there.
_clientState.exapandedItems = 0
_enabled = true
_expendedItem = null
_id = null
_initialized = true

Tell me if you need more info, ask me.

In case it's not clear, i can make some step to reproduce:
1.I load my main RadGrid, then open a row.
2.In that row detail, there's some stuff, along with a RadPanel, and another Radgrid, that has the "add a new record" enabled.
3.I expand my RadPanel, everthing is there. I close it.
4.I click on [+] to add a row in my small radgrid, then cancel. (ajax load back the small grid)
5.I click on the RadPanel to expand it, the error occurs.
Second error:
1.
2.
3.I expand my RadPanel, everthing is there. I leave it open.
4.I click on [+] to add a row in my small radgrid, then cancel. (ajax load back the small grid)
5.The error occurs.
Here is the code where the second error occurs:
_windowLoadHandler:function(f){if(this.get_element()==null){return;
}if(this.get_expanded()&&this.get_childListElement()){this.get_childListElement().style.display="none";
this.get_childListElement().style.width="100%";
if(this.get_level()>0&&!this.get_panelBar().get_fullExpandedItem()){this.get_parent()._setChildrenHeight("");

This.get_Parent() is a RadPanelItem too so it can't find the setChildrenHeight too.

Can this occurs because of some mishandled updates with my small radgrid with ajax? We're folowing the prototype method, using  js for every userControl to update grid on client side to prevent the whole page to update.

Please help cause i have really no idea how to fix this.
Thanks!
Sophie.

4 Answers, 1 is accepted

Sort by
0
Sophie
Top achievements
Rank 2
answered on 01 Mar 2013, 06:11 PM
Ok i got more info on this.
This error occurs because my cancel button calls a RadWindow to ask the user if he's sure to cancel, then load back the small Radgrid.
0
Ed
Top achievements
Rank 1
answered on 06 Aug 2013, 10:45 AM
I have also observed exactly this behaviour, only this time it happens when a RadPanelBar is present in a page with a RadTreeView.  Can anyone at Telerik help us out?
0
Ishita
Top achievements
Rank 1
answered on 23 Oct 2013, 09:48 AM
Hi Telerik,

I am facing the same javascript issue in the WebResource.axd file in a page.
My page has a RadPanel with two panel items and having user controls.Both the panels are expanded on page load. On collapsing the panels once, I am not able to expand them back because it throws a javascript error as follows:

Message: Object doesn't support property or method '_setChildrenHeight'
Line: 776
Char: 51
Code: 0
URI: http://myserver:1000/ScriptResource.axd?d=76thsVyffH72BiGFsVikAiL3kEt6lbbnDHLC98MoDEnnzbqP0ATSp3GzFq5aGBVEAM4xU1A-t0ZP9ub77F8qOKf7P-XkSxMl656qZW4O1UcaZM1mKAp-sqG8UC5ZJBKEFYZZqVnOluTHw1YBzxMc_1GuyuooLu8QZLm9Cq6XjNrCiq0ka5HpFFm6_Ns0YAtIHZD5ybT55tqzql9nVeHt2Q2&t=ffffffff987f999b

Any suggestions will be helpful.

Thanks :)
0
Boyan Dimitrov
Telerik team
answered on 28 Oct 2013, 11:17 AM
Hello,

I am afraid that I am not able to replicate the described error message. Please find attached a sample project containing a RadPanelBar control with some child items and each item contains a user control with a text box control. On initial page load all parent RadPanelBar items are expanded. Expanding/collapsing any RadPanelBar item could be achieve without any errors. Please explain what exactly is different in your scenario and try to replicate that problem with the attached sample project.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
PanelBar
Asked by
Sophie
Top achievements
Rank 2
Answers by
Sophie
Top achievements
Rank 2
Ed
Top achievements
Rank 1
Ishita
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or