Since it doesn't seem possible to hide the splitterbar programatically I had code to collapse the left pane of a verticle web splitter to 0px.
Programmatically I do this
if (bLockDown)
{
Panel1.Visible = false; //to hide contents in first pane
WebSplitter.Panes[0].MinSize = Unit.Pixel(0);
WebSplitter.Panes[0].Size = Unit.Pixel(0);
WebSplitter.Panes[0].Lock = true;
}
else
// do opposite to show
Panel1.Visible =true;
WebSplitter.Panes[0].MinSize = Unit.Pixel(130);
WebSplitter.Panes[0].Size = Unit.Pixel(200);
WebSplitter.Panes[0].Lock = false;
When you login, everything is collapsed to start. Once user is authenticated, I show the pane by setting flag. This works properly. But, once I log out, setting the Panes[0].Size seems to have no effect. Sometimes you can even see the splitter pane snap back to open. Like something is overriding what I set in the server side code. Inside the left Pane is a UltraListBar.
I fixed this problem a while back by setting the size to 1 pixel. For some reason setting it to zero made it do something underneath.
When I set these lines to 1, it then worked.
WebSplitter.Panes[0].MinSize = Unit.Pixel(1);
WebSplitter.Panes[0].Size = Unit.Pixel(1);
Really weird but, I was just happy to get it working.
Where does this code live? Do you have it in a user control? Perhaps you have something going on surrounding checking your postback flags.