New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

A flexible UI component for ASP.NET applications that allows users to manage content size and layout by splitting areas into resizable panes.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[EmbeddedSkin("Splitter")]
[EmbeddedSkin("Splitter", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadEditor))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
[TelerikToolboxCategory("Container")]
[ToolboxBitmap(typeof(RadSplitter), "Toolbox.Icons.Splitter.png")]
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadSplitter", "Telerik.Web.UI.Splitter.RadSplitterScripts.js")]
public class RadSplitter : SplitterItemsContainer, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl

Inheritance: objectControlWebControlRadWebControlSplitterItemsContainerRadSplitter...

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIParserAccessorIPostBackDataHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members SplitterItemsContainer.GetParentPane()SplitterItemsContainer.GetItemById(string)SplitterItemsContainer.CreateControlCollection()SplitterItemsContainer.AddParsedSubObject(object)SplitterItemsContainer.Page_PreRenderComplete(object, EventArgs)SplitterItemsContainer.ItemsWebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.SaveViewState()WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagKeyWebControl.TagNameWebControl.ToolTipControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadSplitter()

Properties

Set/Get size of the splitter border

C#
[ClientControlProperty]
[ClientPropertyName("_borderSize")]
public int BorderSize { get; set; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadWebControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Resize the splitter in 100% of the page

C#
[Browsable(false)]
[Obsolete("The FullScreenMode property is deprecated in RadSplitter for ASP.NET Ajax. Use Width and Height instead.", false)]
public bool FullScreenMode { get; set; }

Sets/gets the height of the splitter

C#
[ClientControlProperty]
[ClientPropertyName("_height")]
public override Unit Height { get; set; }

Overrides: RadWebControl.Height

Sets/gets the pixels that should be substracted from the splitter height when its height is defined in percent

C#
[ClientControlProperty]
public int HeightOffset { get; set; }

Sets/gets whether the rendering of the splitter panes is previewed during the resize

C#
[ClientControlProperty]
public bool LiveResize { get; set; }
C#
[Obsolete("This property is now obsolete. Please use the OnClientResizing property instead.", false)]
public string OnClientBeforeResize { get; set; }

Gets or sets a value indicating the client-side event handler that is called when the RadSplitter control is initialized.

C#
[ClientControlProperty]
[ClientPropertyName("_load")]
public string OnClientLoad { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Two parameters are passed to the handler:

  • sender, the RadSplitter that fired the event
  • args

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientLoad</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientLoad(sender, args)<br />
         {<br />
         alert(sender.get_id());<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radspl:RadSplitter ID="RadSplitter1"<br />
         runat= "server"<br />
        <strong>OnClientLoad="OnClientLoad"</strong>&gt;<br />
        ....<br />
        &lt;/radspl:RadSplitter&gt;
    </div>
</p>
C#
[Obsolete("This property is now obsolete. Please use the OnClientLoad property instead.", false)]
public string OnClientLoaded { get; set; }

Gets or sets a value indicating the client-side event handler that is called when the RadSplitter is resized.

C#
[ClientControlEvent]
[ClientPropertyName("resized")]
public string OnClientResized { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientResized client-side event handler is called when the RadSplitter is resized. Two parameters are passed to the handler:

  • sender, the event object
  • eventArgs with the following methods:
    • get_oldWidth - the width of the splitter before the resize
    • get_oldHeight - the height of the splitter before the resize

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientResized</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientResizedHandler(sender, eventArgs)<br />
         {<br />
         alert(sender.get_id());<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radspl:RadSplitter ID="RadSplitter1"<br />
         runat= "server"<br />
        <strong>OnClientResized="OnClientResizedHandler"</strong>&gt;<br />
        ....<br />
        &lt;/radspl:RadSplitter&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called before the RadSplitter is resized.

C#
[ClientControlEvent]
[ClientPropertyName("resizing")]
public string OnClientResizing { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Two parameters are passed to the handler:

  • sender, the RadSplitter that fired the event
  • args with the following methods:
    • get_newWidth - the new width that will be applied to the RadSplitter object
    • get_newHeight - the new height that will be applied to the RadSplitter object

This event can be cancelled.

Example:
C#
The following example demonstrates how to use the <strong>OnClientResizing</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientResizing(sender, args)<br />
         {<br />
         alert(sender.get_id());<br />
            args.set_cancel(true);//cancel the event<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;radspl:RadSplitter ID="RadSplitter1"<br />
         runat= "server"<br />
        <strong>OnClientResizing="OnClientResizing"</strong>&gt;<br />
        ....<br />
        &lt;/radspl:RadSplitter&gt;
    </div>
</p>

Specify the orientation of the panes inside the splitter

C#
[ClientControlProperty]
[ClientPropertyName("_orientation")]
public Orientation Orientation { get; set; }

Set/Get size of the splitter panes border

C#
[ClientControlProperty]
[ClientPropertyName("_panesBorderSize")]
public int PanesBorderSize { get; set; }

Set/Get the way the panes are resized

C#
[ClientControlProperty]
[ClientPropertyName("_resizeMode")]
public SplitterResizeMode ResizeMode { get; set; }

Sets/gets whether the splitter will be resized when the browser window is resized. The Width or Height properties should be defined in percent.

C#
[ClientControlProperty]
[ClientPropertyName("_resizeWithBrowserWindow")]
public bool ResizeWithBrowserWindow { get; set; }

Sets/gets whether the splitter will resize when the parent pane is resized

C#
public bool ResizeWithParentPane { get; set; }

Set/Get size of the split bars - in pixels

C#
public Unit SplitBarsSize { get; set; }

Whether the Splitter should be visible during its initialization or not

C#
[ClientControlProperty]
[ClientPropertyName("_visibleDuringInit")]
public bool VisibleDuringInit { get; set; }

Sets/gets the width of the splitter

C#
[ClientControlProperty]
[ClientPropertyName("_width")]
public override Unit Width { get; set; }

Overrides: RadWebControl.Width

Methods

Code moved into this method from OnPreRender to make sure it executed when the framework skips OnPreRender() for some reason

C#
protected override void ControlPreRender()

Overrides: RadWebControl.ControlPreRender()

C#
protected override void DescribeClientEvents(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeClientEvents(IScriptDescriptor)

C#
protected override void DescribeClientProperties(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeClientProperties(IScriptDescriptor)

C#
protected override void DescribeComponent(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeComponent(IScriptDescriptor)

Retrieves a RadPane by its ID from the items collection.

C#
public virtual RadPane GetPaneById(string paneId)
Parameters:paneIdstring

The ID of the pane to retrieve.

Returns:

RadPane

The RadPane with the specified ID, or null if not found.

Gets a list of all RadPane items contained in this RadSplitter.

C#
public ArrayList GetPanes()
Returns:

ArrayList

An ArrayList of RadPane objects.

Retrieves a RadSplitBar by its ID from the items collection.

C#
public RadSplitBar GetSplitBarById(string splitBarId)
Parameters:splitBarIdstring

The ID of the split bar to retrieve.

Returns:

RadSplitBar

The RadSplitBar with the specified ID, or null if not found.

Gets a list of all RadSplitBar items contained in this RadSplitter.

C#
public ArrayList GetSplitBars()
Returns:

ArrayList

An ArrayList of RadSplitBar objects.

C#
protected Unit GetVarSize()
Returns:

Unit

Determines whether the splitter orientation is horizontal.

C#
public bool IsHorizontal()
Returns:

bool

True if the orientation is horizontal; otherwise, false.

C#
protected override void OnInit(EventArgs e)
Parameters:eEventArgs

Overrides: RadWebControl.OnInit(EventArgs)

C#
protected override void RegisterInitializeScriptWithScriptManager()

Overrides: SplitterItemsContainer.RegisterInitializeScriptWithScriptManager()