We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to save and Restore pane sizes

Hi

Is it possible to save and restore pane sizes?
Also is any way to use percent for pane sizes?

Thank you in advance for the help

George

3 Replies

RJ Rekha J Syncfusion Team January 30, 2017 06:39 AM UTC

Hi George,   
  
Thanks for contacting Syncfusion Support.   
  
Query 1: Is it possible to save and restore pane sizes?   
Yes.  You can save and restore pane sizes in splitter. To achieve your requirement, you have to use the “setModel” option. There are two buttons and bind click events to the button control. One is used to save the paneSize value and change the value. Another button is used to restore the initial value. You can get the model paneSize values using instance of the splitter control. Save the values to global variables. To change the paneSize values use the setModel and you will see the changes in the splitter. Again, you can restore the previous paneSize value to the model properties using “setModel” option.    
  
Query 2:  is any way to use percent for pane sizes?   
To achieve your requirement, you have to declare panesize value with “%” values.    
Please refer to the below code snippet to achieve this.   
  
   
<e-split-pane paneSize="50%">   
</e-split-pane>   
<e-split-pane paneSize="50%">   
</e-split-pane>   
   
  
   
For your reference, we have created a simple sample and the sample is available in:   
  
Regards,   
Rekha  
 



GR George Rossopoulos January 30, 2017 07:41 AM UTC

Hi Rekha

thank you. Works!.
Added also a 'resize' event and job done!!

George


RJ Rekha J Syncfusion Team January 31, 2017 05:01 AM UTC

Hi George, 

Thanks for the update. 

We are glad the suggestion helped you to resolve the issue. 

Please let us know if you need further assistance. 
 
Regards, 
Rekha J.


Loader.
Live Chat Icon For mobile
Up arrow icon