panelBar.set_cssClass() doesn't work

6 posts, 0 answers
  1. mac-mac
    mac-mac avatar
    8 posts
    Member since:
    Nov 2008

    Posted 15 Oct 2009 Link to this post


    panelBar.set_cssClass() method doesn't seem to work on my project.

    childItem =

    new Telerik.Web.UI.RadPanelItem();








    ...add item follows...

    Am using this version:  2008.1.515.35

    Any idea?




  2. Paul
    Paul avatar
    4281 posts

    Posted 15 Oct 2009 Link to this post

    Hi mac-mac,

    This version of RadControls is not supported anymore. Please update to the latest version of RadControls for ASP.NET AJAX and let us know how it goes.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. don
    don avatar
    2 posts
    Member since:
    Oct 2010

    Posted 15 Oct 2010 Link to this post

    Hello Support ... I have a very similar problem with the RadTreeNode in this version.  the set_cssClass method does not actually set the class when called via client-side javascript.  The property works fine when the attribute is sent down from the server.  The application is near end of life and "upgrading to the latest version" is not feasible for it.  Can you tell me if this problem has been fixed in the latest release and if so, what the fix is so I might be able to hack it into this release?

    client script to repro:
    children is the parent node's get_nodes() result:
    data is a name/value collection of node data.



    node = new Telerik.Web.UI.RadTreeNode();








  4. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 18 Oct 2010 Link to this post

    Hello don,

    Why not try using this approach to set the class for the node:


    See if that works work for you. Also, before trying that, I noticed you didn't enclose data.C in quotation marks. Perhaps that is the reason why it doesn't work.

    I hope that helps.
  5. don
    don avatar
    2 posts
    Member since:
    Oct 2010

    Posted 19 Oct 2010 Link to this post

    "data.C" is a literal whereas data.C looks up the key "C" from name/value collection object "data" and resolves that value, then assigns it as the css class.  net superstar?

    For anyone who wants a real partial solution instead of useless reply, I found that if I refetch the parent and its children, then reset the property to its existing value, it renders correctly.  This smacks of a code bug and I still wonder if the support team is willing to publish the known problem in this old release and the corrected code in the current release.

    ... all my code above ...

    pseudo-code fix
    var children=parent.get_nodes();
    foreach(child in children)
      if (child.get_cssClass()) child.set_cssClass(child.get_cssClass())

    This seems to work although the actual class is attached to a different HTML element than if the cssClass is set by the server and sent down in the first place.  We can fix that through the styling itself.

    Inconsistency == bug
    in my book. 
    We pay for support.  Or at least I thought we got support when we paid.  We definitely paid.  The check has already cleared.  Support seems to have vanished.
  6. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 20 Oct 2010 Link to this post

    So are you saying it doesn't work if you change what I posted to this?

Back to Top