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

This Class defines the RadListBoxItem in RadListBox.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class RadListBoxItem : ControlItem, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IMarkableStateManager, IStateManager, INamingContainer, IXmlSerializable, IComparable

Inheritance: objectControlWebControlControlItemRadListBoxItem

Implements: IAttributeAccessorIComparableIComponentIControlBuilderAccessorIControlDesignerAccessorIDataBindingsAccessorIDisposableIExpressionsAccessorIMarkableStateManagerINamingContainerIParserAccessorIStateManagerIUrlResolutionServiceIXmlSerializable...

Inherited Members ControlItem.SetChildrenDirty()ControlItem.LoadChildViewState(object)ControlItem.SaveChildViewState()ControlItem.TrackChildViewState()ControlItem.GetHierarchicalIndex()ControlItem.SetItemContainer(ControlItemContainer)ControlItem.ReadXml(XmlReader)ControlItem.IsChildControl(Control)ControlItem.GetAllChildren<TControlItem>()ControlItem.GetChildren<TControlItem>(Predicate<TControlItem>)ControlItem.FindChild<TControlItem>(Predicate<TControlItem>)ControlItem.DataItemControlItem.TextControlItem.IDControlItem.IndexControlItem.AccessKeyControlItem.TemplateControlItem.ContainerControlItem.RenderingCompatibilityControlItem.ChildrenControlItem.PropertyMappingsWebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.SaveViewState()WebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.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.AddParsedSubObject(object)Control.EnsureID()Control.OnInit(EventArgs)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.CreateControlCollection()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.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.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

Initializes a new instance of the RadListBoxItem class.

C#
public RadListBoxItem()

Initializes a new instance of the RadListBoxItem class.

C#
public RadListBoxItem(string text, string value)
Parameters:textstring

The text of the item.

valuestring

The value of the item.

Initializes a new instance of the RadListBoxItem class.

C#
public RadListBoxItem(string text)
Parameters:textstring

The text of the item.

Properties

Gets or sets a value indicating whether the Item can be dragged and dropped.

C#
[ClientPersistedProperty]
public bool AllowDrag { get; set; }
Property Value:

True if the user is able drag and drop the Item; otherwise false. The default value is true.

Gets or sets a value indicating whether the item is checkable. A checkbox control is rendered for checkable nodes.

C#
[ClientPersistedProperty]
public bool Checkable { get; set; }

If the CheckBoxes property set to true, RadTreeView automatically displays a checkbox next to each node. You can set the Checkable property to false for nodes that do not need to display a checkbox.

Gets or sets a value indicating whether the item is checked or not.

C#
public bool Checked { get; set; }
Property Value:

True if the item is checked; otherwise false. The default value is false

Gets the data key.

C#
[Browsable(false)]
public object DataKey { get; }
Property Value:

The data key.

Gets or sets the path to an image to display for the item.

C#
[ClientPersistedProperty]
public string ImageUrl { get; set; }
Property Value:

The path to the image to display for the item. The default value is empty string.

Use the ImageUrl property to specify the image for the item. If the ImageUrl property is set to empty string no image will be rendered. Use "~" (tilde) when referring to images within the current ASP.NET application.

Gets the RadListBox which this item belongs to.

C#
[Browsable(false)]
public RadListBox ListBox { get; }
Property Value:

The RadListBox which this item belongs to; null (Nothing) if the item is not added to any RadListBox control.

C#
protected virtual IRenderer Renderer { get; }

Gets or sets a value indicating whether this RadListBoxItem is selected.

C#
public bool Selected { get; set; }
Property Value:

true if selected; otherwise, false.

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets or sets the value of this RadListBoxItem.

C#
public override string Value { get; set; }
Property Value:

The value of the item. If the Value property is not set the Text will be returned.

Overrides: ControlItem.Value

Methods

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WebControl.AddAttributesToRender(HtmlTextWriter)

Clones this instance.

C#
public RadListBoxItem Clone()
Returns:

RadListBoxItem

Compares the current instance with another object of the same type.

C#
public int CompareTo(object obj)
Parameters:objobject

An object to compare with this instance.

Returns:

int

A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj.

Exceptions: ArgumentException

obj is not the same type as this instance.

Implements: IComparable.CompareTo(object)

C#
protected override ControlItemCollection CreateChildItemCollection()
Returns:

ControlItemCollection

Overrides: ControlItem.CreateChildItemCollection()

C#
protected virtual IRenderer CreateItemRenderer()
Returns:

IRenderer

C#
protected override void LoadFromDictionary(IDictionary<string, object> dictionary)
Parameters:dictionaryIDictionary<string, object>

Overrides: ControlItem.LoadFromDictionary(IDictionary<string, object>)

Removes this RadListBoxItem from the RadListBox control which contains it.

C#
public void Remove()

Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers.

C#
public override void RenderBeginTag(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

A HtmlTextWriter that represents the output stream to render HTML content on the client.

Overrides: WebControl.RenderBeginTag(HtmlTextWriter)

C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WebControl.RenderContents(HtmlTextWriter)

C#
protected override void WriteXml(XmlWriter writer)
Parameters:writerXmlWriter

Overrides: ControlItem.WriteXml(XmlWriter)