Not able to set text on radpanelitem clientside when item is expanding/collapsing

2 posts, 1 answers
  1. Jan Pfeffer
    Jan Pfeffer avatar
    56 posts
    Member since:
    Aug 2006

    Posted 30 Jan 2013 Link to this post

    Hey at Telerik

    I am trying to set the text of a radpanelitem when the item is either expanding or collapsing.

    I have set the a text on the value attribute and i would like to switch the text to nothing when the item is collapsed and the text from the value attribute when the item is expanded.

    I use the method set_text, but it doesn't seem to work.

    I have attached a sample project showing my problem here.

    I hope u can help me.

    Sincerly Jan
  2. Answer
    Kate avatar
    1898 posts

    Posted 01 Feb 2013 Link to this post

    Hello Jan,

    You can use the following line of code in order to get the desired functionality of the RadPanelBar:
    function rpbPlaygroundClientItemExpand(sender, eventArgs) {
                   var radMenuItem = eventArgs.get_item();
                   var value = eventArgs.get_item().get_value();
                   $telerik.$(".rpText").css("display", "inherit");
               function rpbPlaygroundClientItemCollapse(sender, eventArgs) {

    the Telerik team
    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 their blog feed now.
Back to Top