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

Seeking a way around using objSplitter.set_height()

1 Answer 55 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
ADH
Top achievements
Rank 1
ADH asked on 24 Apr 2008, 07:08 PM
I've discovered that calling set_height() on a splitter in the OnClientLoaded event causes a minor delay of at least 100ms. It's not much, but it's just enough that people seem to notice when they first visit each page - they find they can't click anything for the instant after the page loads and start to get frustrated, then the splitter finishes resizing and they are able to work.

I'm trying to make sure the splitter is tall enough to display all its content without scrolling the splitter. Is there a way around using javascript to do this? Maybe in the CSS, or with tweaks to the splitter itself? Barring that, is there a way to speed up the set_height() method? I'm willing to edit the native javascript files, but not without making sure I won't mess something up inadvertantly.

As a temporary fix, I've set VisibleDuringInit to false. It still takes 100ms+ for the splitter to appear, but when it does, it's fully formed and ready to be clicked upon. This does mean that some of the RadComboBox controls within the splitter render strangely (too short until you hover over them, and background image shows up incorrectly) but that, I can probably deal with in the CSS for the combo boxes.

So: Is there a way around using javascript to set the splitter to size with its contents? If so, how? Ideas welcome, even if they might not work - I'm willing to test anything.

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetie
Telerik team
answered on 29 Apr 2008, 12:53 PM
Hi ADH,
The RadSpllitter is a complex control and the HTML of which it consists is complex. For the time being, the splitter uses TABLE elements and because of known issues with Height in percent under IE, the control always calculates and keeps its height in pixels. Having said that, and taking into account the fact that the RadSplitter does not offer the functionality you try to mimic - that is, to resize the itself to the height of its content, I would say that the only reliable way to get the desired result under all supported browsers, is to use javascript to calculate and set the Height of the splitter.

I would additionally suggest that you use the VisibleDuringInit property, but you mention that you are already using it. I am not quite sure what the problem with the RadComboBox controls is, but in case you could send us your code, with which we can reproduce it, we will do our best to help you fix it.

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Splitter
Asked by
ADH
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or