Using multiple CollapsiblePanel with automatic positioning

2 posts, 0 answers
    HMPSOLBB avatar
    24 posts
    Member since:
    Mar 2012

    Posted 24 Jun 2014 Link to this post


    I want to use multiple CollapsiblePanel on a form, all of them are loaded collapsed. The ExpandDirection is "down". If I open the first one I want to second (and also the others) to move down, starting below the first CollapsiblePanel. What is the best way to do this? Either witch CollapsiblePanel is open, the folowing have to start below of opened one.


  2. Stefan
    Stefan avatar
    2911 posts

    Posted 26 Jun 2014 Link to this post

    Hello Oliver,

    Thank you for writing.

    To do that, once you expand the first panel, you need to check its size and according to its new size, set the Location of the rest of the panels i.e if you have three panels, all collapsed with height 40 px. The first is located at 0,40, the second at 0,80, the third at 0,120. Once you expand the first, check its size (let's say 140), deduct the initial panel size (140 - 40) and add the difference to the Y location of the other panels i.e. second panel location should be 0,140 and third panel location should be 0,180.

    I hope that you find this information useful.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top