This is a migrated thread and some comments may be shown as answers.

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

5 Answers 75 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
jeff
Top achievements
Rank 1
jeff asked on 16 Jan 2014, 08:46 PM
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.

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 17 Jan 2014, 02:40 PM
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!
0
jeff
Top achievements
Rank 1
answered on 17 Jan 2014, 02:48 PM
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
0
Dimo
Telerik team
answered on 17 Jan 2014, 02:55 PM
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!
0
Kristian
Top achievements
Rank 1
answered on 17 Mar 2014, 01:59 PM
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
0
Dimo
Telerik team
answered on 17 Mar 2014, 02:25 PM
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!
 
Tags
Splitter
Asked by
jeff
Top achievements
Rank 1
Answers by
Dimo
Telerik team
jeff
Top achievements
Rank 1
Kristian
Top achievements
Rank 1
Share this question
or