ClassRadDropDownList
Represents the RadDropDownList class.
Definition
Namespace:Telerik.WebAii.Controls.Html
Assembly:Telerik.WebAii.Controls.Html.dll
Syntax:
public class RadDropDownList : HtmlContainerControl
Inheritance: objectControlHtmlControlHtmlContainerControlRadDropDownList
Inherited Members
Constructors
RadDropDownList()
Initializes a new instance of the RadDropDownList class.
Declaration
public RadDropDownList()
RadDropDownList(Element)
Initializes a new instance of the RadDropDownList class.
Properties
ClientSideLocator
Get the locator FindParam.
Declaration
public override string ClientSideLocator { get; }
Property Value
Overrides
DefaultMessage
Gets or set the empty message text of the RadDropDownList.
DropDownDiv
Get the drop down div.
DropDownVisible
Gets whether the drop down is visible.
ElementOffsetWidth
Get the offset width of the DropDownList element.
Enabled
Get whether DropDownList is enabled.
ItemCount
Get the item count.
Items
Get the list of items.
Declaration
public IList<RadDropDownListItem> Items { get; }
Property Value
LocatorExpression
Get the FindExpression.
Declaration
public override IFindExpression LocatorExpression { get; }
Property Value
Overrides
RenderMode
Render mode of combobox.
SelectedIndex
Gets the selected index of the RadDropDownList. Returns '-1' if there is no selected item.
Methods
AssignElement(Element)
Assign the DOM element to be the RadDropDownList control.
Declaration
public override void AssignElement(Element e)
Parameters
e
Overrides
ControlAssert()
Returns RadControlAssert instance initialized for this control.
Declaration
public RadControlAssert ControlAssert()
Returns
RadControlAssert instance initialized for this control.
FindItem(Predicate<RadDropDownListItem>)
Find item by given predicate.
Declaration
public RadDropDownListItem FindItem(Predicate<RadDropDownListItem> predicate)
Parameters
predicate
Predicate<RadDropDownListItem>
The predicate used as a search criteria.
Returns
The item found or 'null' if no item matches the given search criteria.
FindItemByIndex(int)
Finds item by Index.
Declaration
public RadDropDownListItem FindItemByIndex(int itemIndex)
Parameters
itemIndex
Returns
FindItemByText(string)
Finds item by Text.
Declaration
public RadDropDownListItem FindItemByText(string itemText)
Parameters
itemText
Returns
FindItemByValue(string)
Finds item by Value.
Declaration
public RadDropDownListItem FindItemByValue(string itemValue)
Parameters
itemValue
Returns
FindItemIndexByText(string)
Finds item index by text.
FindItemIndexByValue(string)
Finds item index by value.
FindItems(Predicate<RadDropDownListItem>)
Get a list of items matching the given predicate.
Declaration
public IList<RadDropDownListItem> FindItems(Predicate<RadDropDownListItem> predicate)
Parameters
predicate
Predicate<RadDropDownListItem>
The predicate, i.e. (item => item.Text == myText).
Returns
The items matching the given predicate.
HideDropDown()
Hide the drop down of RadDropDownList.
Declaration
public void HideDropDown()
SelectItemByIndex(int)
Selects item by index.
SelectItemByText(string)
Selects item by Text.
Declaration
public void SelectItemByText(string itemText)
Parameters
itemText
SelectItemByValue(string)
Selects item by Value.
Declaration
public void SelectItemByValue(string itemValue)
Parameters
itemValue
SetText(string, ScrollToVisibleType)
Types the given text to the DropDownList input using default typing speed. Swows the drop down as well.
Declaration
public void SetText(string text, ScrollToVisibleType scrollToVisibleType = ScrollToVisibleType.ElementTopAtWindowTop)
Parameters
text
The text to set.
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
public void SetText(string text, int typeSpeed, ScrollToVisibleType scrollToVisibleType = ScrollToVisibleType.ElementTopAtWindowTop)
Parameters
text
The text to set.
typeSpeed
The typing speed (characters typing) in milliseconds.
scrollToVisibleType
Specifies how element should be put into view.
ShowDropDown()
Show the drop down of RadDropDownList.
Declaration
public void ShowDropDown()