Javascript error when using RadTreeView in invisible detailsview field

4 posts, 1 answers
  1. Alexander
    Alexander avatar
    20 posts
    Member since:
    Jun 2008

    Posted 08 Mar 2009 Link to this post

    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); 







    }; 



     



    ... 



  2. Answer
    Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 11 Mar 2009 Link to this post

    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.
  3. Alexander
    Alexander avatar
    20 posts
    Member since:
    Jun 2008

    Posted 11 Mar 2009 Link to this post

    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.
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 11 Mar 2009 Link to this post

    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.
Back to Top