Click on the links below the splitter and see the result. Check the source code to see how the actions are implemented. See also the
Client-Side API
RadSplitter provides a flexible client-side API that allows you to
change easily the configuration in the browser.
-
Getting the RadSplitter client-side object:
var splitter = <%= RadSplitter1.ClientID %>;
-
Once you get the client-side object of RadSplitter, you can use the GetPaneById
method to get the instance of a particular pane. Example:
var splitter = <%= RadSplitter1.ClientID %>;
var pane = splitter.GetPaneById("RadPane1");
You can also use the GetPaneByIndex method to get an instance of a pane. Example:
var splitter = <%= RadSplitter1.ClientID %>;
var pane = splitter.GetPaneByIndex(1);
You can also get the collection of all panes in the splitter using the GetPanes method:
var splitter = <%= RadSplitter1.ClientID %>;
var panes = splitter.GetPanes(); // get the panes collection
// loop the the collection
for (var i=0; i < panes.length; i ++)
{
var paneObj = panes[i]; // get instance of the RadPane
}
-
Using the client-side API you can Collapse, Expand, Resize. Examples:
var splitter = <%= RadSplitter1.ClientID %>;
var pane = splitter.GetPaneById("RadPane1");
var isCollapseSuccess = pane.Collapse(); // collapse this pane
var isExpandSuccess = pane.Expand(pane); // expand this pane
pane.Resize(100); // increase panes size with 100px
-
You can use the GetWidth, GetHeight methods to get the size of the splitter or panes. Example:
var splitter = <%= RadSplitter1.ClientID %>;
var splitterWidth = splitter.GetWidth();
var splitterHeight = splitter.GetHeight();
var pane = splitter.GetPaneById("RadPane1");
var paneWidth = pane.GetWidth();
var paneHeight = pane.GetHeight();
For more detailed preview of the client-side API please refer to the documentation.