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

Problem when Unpinned Splitters are expanded and Window Resizes

1 Answer 69 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 12 Sep 2011, 03:39 PM
Noticed a bug in our software, but then was able to recreate it on the telerik demos... any assistance you can give in trying to repair this would be appreciated.. Please see the following link for a better understanding of what i'm talking about.

http://www.youtube.com/watch?v=pTWHAxaFfvI

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 13 Sep 2011, 03:13 PM
Hi Kevin,

This issue is more related to the positioning of the splitter itself. Notice that the splitter is moving as well along with the resize of the window. Having the sliding pane positioned absolutely, it stays in place, but the splitter starts moving. A solution to this is to cause the sliding pane to collapse when the window start resizing. Please, try the following method as an event handler to the OnClientLoaded client-side event of the splitter:
function handleWindowResize(splitter, args)
{
    $telerik.$(document).resize(function() {
        $telerik.$.each(getSlidingZones(), function(index, zone) {
            $telerik.$.each(zone.getPanes(), function(index, pane) {
                if(pane.get_expanded())
                    zone.collapsePane(pane.get_id());
            });
        });
    });
}
  
function getSlidingZones() { return [$find("<%= SlidingZone1.ClientID %>"), $find("<%= Radslidingzone2.ClientID %>"), $find("<%= Radslidingzone1.ClientID %>")]; }
Just make sure that the getSlidingZones method returns the correct sliding zone as per your application.

Thank you for reporting this issue in our demos. As a sign of gratitude for your efforts I have updated your Telerik points.

Kind regards,
Niko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Splitter
Asked by
Kevin
Top achievements
Rank 2
Answers by
Niko
Telerik team
Share this question
or