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

how to make the rad panes, spitters adjust according to resolution of the monitor ?

1 Answer 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prasad
Top achievements
Rank 1
Prasad asked on 23 Dec 2011, 03:24 PM
Hi ,


I have implemented a page with multiple rad panes and splitters. The Panes are adjusted according to my monitor resolution. (as it is not accepting the height and width values in terms of percentage)

The issue is..

When it was opened on another screen resolution, everything appears quite ugly.(due to the width and height of the panes)

can you please provide us a solution where the size of the panes should adjust according to the screen of the monitor.

Thanks in advance !,


regards,
Prasad.

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 23 Dec 2011, 03:33 PM
Hello Prasad,

 Actually, the RadSplitter control supports percentages size but when you configure it in percentages, all its parent elements including the body, form and html should have their size explicitly set either in percentages or pixels in order to let the splitter calculate the size it should take. You can see a sample demo explaining this below:

http://demos.telerik.com/aspnet-ajax/splitter/examples/resizewithwindow/defaultcs.aspx

This being said, you will get the desired behavior by adding the following style to your page:

<style type="text/css">   
  html, body, form   
  {   
    height: 100%;   
    margin: 0;   
    padding: 0;   
  }   
        
  </style>

 

If the splitter is nested in other element, e.g DIV, TD, TR, TABLE, etc, you should also set explicit height to all the parent elements. Please, note, that this not directly related to the splitter control but is a general rule and you will reproduce the very same behavior if you replace the splitter with a simple DIV element with size set in percentages.

On a side note, I also suggest to set VisibleDuringInit=false for the splitter - this will hide the initial resizing of the splitter from the end user and you will get a better behavior.

I hope that my explanations and suggestions are helpful - in case you need further assistance, please share your code here (it is not needed to put the content of the splitter, just its markup along with all its parent elements) and I will modify it for you in order to become 100% of the page.

Greetings,
Svetlina Anati
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
General Discussions
Asked by
Prasad
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or