Welcome Guest Search | Active Topics | Sign In | Register

How to use JavaScript to operate the Splitter. Options
Juan Roman Escamilla
Posted: Wednesday, December 19, 2007 1:35:18 PM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 10
I am using a splitter control in my page where I have a sidebar that I want to show or hide programatically. My design requires the collapse and expand operations to be performed from different buttons.

The only way I have managed to pull this off is by using server-side code and wrapping the Splitter within a CallbackPanel, any my code Turns on/off the Collapsed property of the splitter-pane. This does the trick but I would preferr to do this using javascript, it should be the same code as the demo for Expand and Collapse buttons.

How can I do this with JavaScript?

Here's the server-side code I have now:

Code: C#
/// <summary>
/// Handles the Click event of the manageThisPageLinkButton control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected void OnManageThisPageLinkButtonClick(object sender, EventArgs e)
{
    if (null != this.powerStripSplitterPane)
    {
        // Expand the Power Strip Splitter Pane
        this.powerStripSplitterPane.Collapsed = false;
    }
}

/// <summary>
/// Handles the Click event of the closePowerStripImageButton control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Web.UI.ImageClickEventArgs"/> instance containing the event data.</param>
protected void OnClosePowerStripImageButtonClick(object sender, System.Web.UI.ImageClickEventArgs e)
{
    if (null != this.powerStripSplitterPane)
    {
        // Collapse the Power Strip Splitter Pane
        this.powerStripSplitterPane.Collapsed = true;
    }
}
eo_support
Posted: Wednesday, December 19, 2007 1:41:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi,

Unfortunately there is no way to do that on the client side in the current version. The client side Splitter interface is quite simple and it only returns the size of the left pane and right pane. It makes perfect sense to be able to set collapsed on the client side though, so we will look into it and see if we can add that.

Thanks
Juan Roman Escamilla
Posted: Wednesday, December 19, 2007 1:54:13 PM
Rank: Member
Groups: Member

Joined: 12/17/2007
Posts: 10
Is suppose you mean in another version?
eo_support
Posted: Wednesday, December 19, 2007 3:12:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Juan Roman Escamilla wrote:
Is suppose you mean in another version?


Hopefully yes.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.