Class
RadDropDownList

Represents the RadDropDownList class.

Definition

Namespace:Telerik.WebAii.Controls.Html

Assembly:Telerik.WebAii.Controls.Html.dll

Syntax:

cs-api-definition
public class RadDropDownList : HtmlContainerControl

Inheritance: objectControlHtmlControlHtmlContainerControlRadDropDownList

Inherited Members HtmlContainerControl.TextContentHtmlContainerControl.InnerTextHtmlControl.FindParentContainer<TContainerControl>()HtmlControl.ValidateTag(string)HtmlControl.ValidateControl()HtmlControl.ParseResponseValue<T>(string, T)HtmlControl.GetAttributeAsString(string)HtmlControl.InitializeMappings(MappingsCollection)HtmlControl.GetRectangle()HtmlControl.IsVisible()HtmlControl.GetStyleValue(string)HtmlControl.GetStyle(string)HtmlControl.GetComputedStyleValue(string)HtmlControl.GetComputedStyle(string)HtmlControl.Parent<TContainerControl>()HtmlControl.Capture()HtmlControl.Capture(string, string)HtmlControl.Capture(string)HtmlControl.InvokeEvent(ScriptEventType)HtmlControl.InvokeEvent(ScriptEventType, bool)HtmlControl.InvokeEvent(ScriptEvent)HtmlControl.InvokeEvent(ScriptEvent, bool)HtmlControl.AddEventListener(string, EventHandler<JavascriptEventArgs>)HtmlControl.RemoveEventListener(string, EventHandler<JavascriptEventArgs>)HtmlControl.MouseClick()HtmlControl.MouseClick(MouseClickType)HtmlControl.MouseClick(MouseClickType, int, int)HtmlControl.MouseClick(MouseClickType, Point, OffsetReference)HtmlControl.MouseClick(MouseClickType, int, int, OffsetReference)HtmlControl.MouseHover()HtmlControl.MouseHover(Point)HtmlControl.MouseHover(int, int)HtmlControl.MouseHover(int, int, OffsetReference)HtmlControl.Click()HtmlControl.Click(bool)HtmlControl.ScrollToVisible()HtmlControl.ScrollToVisible(ScrollToVisibleType)HtmlControl.ScrollToVisible(ScrollToVisibleType, Rectangle)HtmlControl.Download(bool, DownloadOption, string, int)HtmlControl.CallMethod(string)HtmlControl.CallMethod<T>(string)HtmlControl.CallMethod<T>(string, T)HtmlControl.GetValue<T>(string)HtmlControl.GetValue<T>(string, T)HtmlControl.GetValue<T>(string, bool)HtmlControl.GetValue<T>(string, bool, T)HtmlControl.SetValue<T>(string, T)HtmlControl.SetValue<T>(string, T, bool)HtmlControl.Focus()HtmlControl.DragTo(OffsetReference, Point, int, int)HtmlControl.DragTo(OffsetReference, int, int, Rectangle, OffsetReference, int, int)HtmlControl.DragTo(Point)HtmlControl.DragTo(int, int)HtmlControl.DragTo(HtmlControl)HtmlControl.DragTo(HtmlControl, OffsetReference, Point)HtmlControl.DragTo(OffsetReference, Point, HtmlControl)HtmlControl.DragTo(OffsetReference, Point, HtmlControl, OffsetReference, Point)HtmlControl.DragTo(OffsetReference, int, int, bool, HtmlControl, OffsetReference, int, int, bool)HtmlControl.DragToWindowLocation(OffsetReference, int, int, bool, OffsetReference, int, int, bool)HtmlControl.ToString()HtmlControl.AsjQueryControl()HtmlControl.GetElementByTagNameClientSideLocatorHtmlControl.GetElementByIdClientSideLocatorHtmlControl.FindHtmlControl.ScrollTopHtmlControl.ScrollLeftHtmlControl.WaitHtmlControl.IDHtmlControl.CssClassHtmlControl.AttributesHtmlControl.MappingsHtmlControl.StylesHtmlControl.EventsHtmlControl.TagNameHtmlControl.ChildNodesHtmlControl.IsActiveElementHtmlControl.IsEnabledControl.Refresh()Control.AssignFailed(Exception)Control.SetTelerikComponentsVersion(TelerikComponentsVersion?)Control.MatchControl(Element, FindParam)Control.GetFamilyElement(int, Element)Control.ThrowOnInvalidAssignmentControl.TelerikComponentsVersionControl.IsRefreshControl.BaseElementControl.OwnerBrowserControl.Locator

Constructors

RadDropDownList()

Initializes a new instance of the RadDropDownList class.

Declaration

cs-api-definition
public RadDropDownList()

RadDropDownList(Element)

Initializes a new instance of the RadDropDownList class.

Declaration

cs-api-definition
public RadDropDownList(Element element)

Parameters

element

Element

Properties

ClientSideLocator

Get the locator FindParam.

Declaration

cs-api-definition
public override string ClientSideLocator { get; }

Property Value

string

Overrides HtmlControl.ClientSideLocator

DefaultMessage

Gets or set the empty message text of the RadDropDownList.

Declaration

cs-api-definition
public string DefaultMessage { get; set; }

Property Value

string

DropDownDiv

Get the drop down div.

Declaration

cs-api-definition
public HtmlDiv DropDownDiv { get; }

Property Value

HtmlDiv

DropDownVisible

Gets whether the drop down is visible.

Declaration

cs-api-definition
public bool DropDownVisible { get; }

Property Value

bool

ElementOffsetWidth

Get the offset width of the DropDownList element.

Declaration

cs-api-definition
public int ElementOffsetWidth { get; }

Property Value

int

Enabled

Get whether DropDownList is enabled.

Declaration

cs-api-definition
public bool Enabled { get; }

Property Value

bool

ItemCount

Get the item count.

Declaration

cs-api-definition
public int ItemCount { get; }

Property Value

int

Items

Get the list of items.

Declaration

cs-api-definition
public IList<RadDropDownListItem> Items { get; }

Property Value

IList<RadDropDownListItem>

LocatorExpression

Get the FindExpression.

Declaration

cs-api-definition
public override IFindExpression LocatorExpression { get; }

Property Value

IFindExpression

Overrides Control.LocatorExpression

RenderMode

Render mode of combobox.

Declaration

cs-api-definition
public RenderMode RenderMode { get; }

Property Value

RenderMode

SelectedIndex

Gets the selected index of the RadDropDownList. Returns '-1' if there is no selected item.

Declaration

cs-api-definition
public int SelectedIndex { get; }

Property Value

int

Text

Gets or set the text of the RadDropDownList.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

Methods

AssignElement(Element)

Assign the DOM element to be the RadDropDownList control.

Declaration

cs-api-definition
public override void AssignElement(Element e)

Parameters

e

Element

Overrides HtmlContainerControl.AssignElement(Element)

ControlAssert()

Returns RadControlAssert instance initialized for this control.

Declaration

cs-api-definition
public RadControlAssert ControlAssert()

Returns

RadControlAssert

RadControlAssert instance initialized for this control.

FindItem(Predicate<RadDropDownListItem>)

Find item by given predicate.

Declaration

cs-api-definition
public RadDropDownListItem FindItem(Predicate<RadDropDownListItem> predicate)

Parameters

predicate

Predicate<RadDropDownListItem>

The predicate used as a search criteria.

Returns

RadDropDownListItem

The item found or 'null' if no item matches the given search criteria.

FindItemByIndex(int)

Finds item by Index.

Declaration

cs-api-definition
public RadDropDownListItem FindItemByIndex(int itemIndex)

Parameters

itemIndex

int

Returns

RadDropDownListItem

FindItemByText(string)

Finds item by Text.

Declaration

cs-api-definition
public RadDropDownListItem FindItemByText(string itemText)

Parameters

itemText

string

Returns

RadDropDownListItem

FindItemByValue(string)

Finds item by Value.

Declaration

cs-api-definition
public RadDropDownListItem FindItemByValue(string itemValue)

Parameters

itemValue

string

Returns

RadDropDownListItem

FindItemIndexByText(string)

Finds item index by text.

Declaration

cs-api-definition
public int FindItemIndexByText(string itemText)

Parameters

itemText

string

Returns

int

FindItemIndexByValue(string)

Finds item index by value.

Declaration

cs-api-definition
public int FindItemIndexByValue(string itemValue)

Parameters

itemValue

string

Returns

int

FindItems(Predicate<RadDropDownListItem>)

Get a list of items matching the given predicate.

Declaration

cs-api-definition
public IList<RadDropDownListItem> FindItems(Predicate<RadDropDownListItem> predicate)

Parameters

predicate

Predicate<RadDropDownListItem>

The predicate, i.e. (item => item.Text == myText).

Returns

IList<RadDropDownListItem>

The items matching the given predicate.

HideDropDown()

Hide the drop down of RadDropDownList.

Declaration

cs-api-definition
public void HideDropDown()

SelectItemByIndex(int)

Selects item by index.

Declaration

cs-api-definition
public void SelectItemByIndex(int itemIndex)

Parameters

itemIndex

int

SelectItemByText(string)

Selects item by Text.

Declaration

cs-api-definition
public void SelectItemByText(string itemText)

Parameters

itemText

string

SelectItemByValue(string)

Selects item by Value.

Declaration

cs-api-definition
public void SelectItemByValue(string itemValue)

Parameters

itemValue

string

SetText(string, ScrollToVisibleType)

Types the given text to the DropDownList input using default typing speed. Swows the drop down as well.

Declaration

cs-api-definition
public void SetText(string text, ScrollToVisibleType scrollToVisibleType = ScrollToVisibleType.ElementTopAtWindowTop)

Parameters

text

string

The text to set.

scrollToVisibleType

ScrollToVisibleType

Specifies how element should be put into view.

SetText(string, int, ScrollToVisibleType)

Types the given text to the DropDownList input using default typing speed. Swows the drop down as well.

Declaration

cs-api-definition
public void SetText(string text, int typeSpeed, ScrollToVisibleType scrollToVisibleType = ScrollToVisibleType.ElementTopAtWindowTop)

Parameters

text

string

The text to set.

typeSpeed

int

The typing speed (characters typing) in milliseconds.

scrollToVisibleType

ScrollToVisibleType

Specifies how element should be put into view.

ShowDropDown()

Show the drop down of RadDropDownList.

Declaration

cs-api-definition
public void ShowDropDown()