RadPanelBar - desible collapsing?

Thread is closed for posting
2 posts, 0 answers
  1. Ljubo Žižić
    Ljubo Žižić avatar
    8 posts
    Member since:
    Jul 2009

    Posted 10 Jul 2009 Link to this post

    Is there any way to disable collapsing of RadPanelBar - GroupStyle ListBar?
    Because, I want to disable collapsing of exact group element until some action has done. After that, all elements should collapse normally.

    Best regards,
  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 13 Jul 2009 Link to this post

    Hello Ljubo Žižić,

    You can achieve this by using the PanelBarGroupExpanding event. The event is fired when a group is expanding.

    Test Example:

    1. I have added three different groups with captions "Default Caption", "Caption" and "DefaultCaption"
    2. I subscribed to PanelBarExpanding event of RadPanelBar
    3. In the event handler, I canceled the expansion of a group with caption different than "Caption". "Caption" is the caption of the group which I want to disable to collapse.

     void radPanelBar1_PanelBarGroupExpanding(object sender, PanelBarGroupCancelEventArgs args)
                if (args.Group.Caption != "Caption")
                    args.Cancel = true;

    In the above code I cancel the expanding of all groups with Captions different than "Caption". I hope this helps.

    Kind regards,
    Boyko Markov
    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