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

Represents an individual item within the RadDropDownList control.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

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

Inheritance: objectControlWebControlControlItemDropDownListItem

Implements: IAttributeAccessorIComparableIComponentIControlBuilderAccessorIControlDesignerAccessorIDataBindingsAccessorIDisposableIExpressionsAccessorIMarkableStateManagerINamingContainerIParserAccessorIStateManagerIUrlResolutionServiceIXmlSerializable...

Inherited Members ControlItem.SetChildrenDirty()ControlItem.LoadChildViewState(object)ControlItem.SaveChildViewState()ControlItem.TrackChildViewState()ControlItem.GetHierarchicalIndex()ControlItem.SetItemContainer(ControlItemContainer)ControlItem.LoadFromDictionary(IDictionary<string, object>)ControlItem.ReadXml(XmlReader)ControlItem.WriteXml(XmlWriter)ControlItem.IsChildControl(Control)ControlItem.GetAllChildren<TControlItem>()ControlItem.GetChildren<TControlItem>(Predicate<TControlItem>)ControlItem.FindChild<TControlItem>(Predicate<TControlItem>)ControlItem.DataItemControlItem.TextControlItem.ValueControlItem.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.RenderBeginTag(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 DropDownListItem class.

C#
public DropDownListItem()

Initializes a new instance of the DropDownListItem class.

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

The text of the item.

valuestring

The value of the item.

Initializes a new instance of the DropDownListItem class.

C#
public DropDownListItem(string text)
Parameters:textstring

The text of the item.

Properties

Gets the RadDropDownList which this item belongs to.

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

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

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 or sets a value indicating whether this DropDownListItem is selected.

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

true if selected; otherwise, false.

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Methods

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

Overrides: WebControl.AddAttributesToRender(HtmlTextWriter)

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()

Removes this DropDownListItem from the RadDropDownList control which contains it.

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

Overrides: WebControl.RenderContents(HtmlTextWriter)

C#
protected void RenderTemplate(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter