Is it possible to load an existing div when appending a splitter window?

6 posts, 0 answers
  1. jeff
    jeff avatar
    5 posts
    Member since:
    Sep 2006

    Posted 16 Jan 2014 Link to this post

    I have an application where users can turn the splitter on and off (not collapse a pane). When they turn it off, I use the splitter.remove to remove the pane and the splitter.append to add the pane back. But it seems like, if I want to put pre-defined data in that pane that I have to supply the html using the .html method. However, I want to maintain the state of the pane which means I need to really be able to show/hide a div. Is there an actual way to do this? It looks like I could use the contentsUrl method but then I have to supply a full page and can't really maintain state in the page.

    Am I going about this in the wrong way?

    Thanks.
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 17 Jan 2014 Link to this post

    Hello Jeff,

    I am not sure I understand you scenario, but I will make an assumption.

    If the Splitter contains multiple panes and one of them should become completely inaccessible, you can collapse the pane and hide the corresponding expand button, so that the users cannot expand the pane back.

    http://jsfiddle.net/dimodi/LjNdD/

    Removing content from the DOM and adding it back afterwards is not a very good option.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. jeff
    jeff avatar
    5 posts
    Member since:
    Sep 2006

    Posted 17 Jan 2014 Link to this post

    So, that's the scenario. And the solution would work but from a UI perspective is there a way to hide the splitter? I figured out how to load the contents of another div into the pane and it works well but it seems a bit heavyweight since I have to use the JQuery clone() method and make updates in two places which is obviously not desirable.

    Thanks Dimo.

    Jeff
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 17 Jan 2014 Link to this post

    Hello Jeff,

    Yes, of course the Splitter can be hidden, just like any other element on the page. I didn't suggest that, because I thought you were having multiple panes inside the Splitter and only one should be removed. Having a Splitter with only one pane in it doesn't make sense.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Kristian
    Kristian avatar
    1 posts
    Member since:
    Nov 2011

    Posted 17 Mar 2014 Link to this post

    Hi,

    We have a similar scenario, where we want to add and remove panes. With your suggestion of just collapsing the pane and hide the expand button, Dimo, we loose the possibility to resize between the panes that are to the left and right of the collapsed pane. Do you have another suggestion for solving this?

    PS! I have implemented a way to remove and add content, but that is eating memory.

    Regards,
    Kristian
  7. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 17 Mar 2014 Link to this post

    Hello Kristian,

    Yes, resize icons are removed when an adjacent pane is collapsed. The assumption is that only panes, which are adjacent to the Splitter boundaries are normally collapsible. Scenarios with collapsible panes in the middle are rare.

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready