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

Javascript error when using RadTreeView in invisible detailsview field

3 Answers 106 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 08 Mar 2009, 10:18 AM
Hello.

I'm using a asp:DetailsView to show some data. This data has some attached material that I display in a RadTreeView, using a TemplateField. Sometimes, however, this field should not be visible, so I set its "Visible" property to false. If I do that, I get a javascript error here:


The error occurs on the line marked with red, because the variable "_23a" is null. As said, this error only occurs if the TemplateField in the DetailsView is set to Visible=false. If set to true, there's no problem. A solution would be much appreciated, as being able to hide fields in a DetailsView seems like something that shouldn't be prohibited.

EDIT: For some reason, when setting the color on the row in the code block, it jumped out of its box (above) and ended up at the very bottom of my post. This seems a bug too, if you ask me. ;-)

... 



 



Telerik.Web.UI.RadTreeView._preInitialize=function(_239,_23a){ 



var _23b=$get(_239); 



_23b.scrollTop=_23a; 



if(Telerik.Web.UI.RadTreeView._isRtl(_23b)){ 



Telerik.Web.UI.RadTreeView._initializeRtl(_23b); 







}; 



 



... 



3 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 11 Mar 2009, 10:32 AM
Hi Alexander,

Thank you pointing this out.

We have fixed the problem in RadTreeView and the fix will be included in the forthcoming Q1 release.
Stay tuned for the official announcement in the next couple of days.

I updated your Telerik Points for your involvement.

Best wishes,
Veselin Vasilev
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.
0
Alexander
Top achievements
Rank 1
answered on 11 Mar 2009, 10:38 AM
A temporary workaround I found, if others find themselves in the same situation, is to set Visible=false on the RadTreeView also. This makes the error go away.
0
Veselin Vasilev
Telerik team
answered on 11 Mar 2009, 10:40 AM
Hi Alexander,

Thank you for sharing the workaround with the community.

Greetings,
Veselin Vasilev
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
Alexander
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Alexander
Top achievements
Rank 1
Share this question
or