A collection of RadSliderItem objects in a RadSlider control.
The RadSliderItemCollection class represents a collection of RadSliderItem objects.
- Use the this[int] to programmatically retrieve a single RadSliderItem from the collection, using array notation.
- Use the Count property to determine the total number of slider items in the collection.
- Use the Add(RadSliderItem) method to add items in the collection.
- Use the Remove(RadSliderItem) method to remove items from the collection.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
public class RadSliderItemCollection : ControlItemCollection, IList, ICollection, IEnumerable, IStateManager
Inheritance: objectStateManagedCollectionControlItemCollectionRadSliderItemCollection
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadSliderItemCollection class.
public RadSliderItemCollection(Control parent)
The owner of the collection.
Properties
Gets the RadSliderItem object at the specified index in the current RadSliderItemCollection.
public RadSliderItem this[int index] { get; set; }
The zero-based index of the RadSliderItem to retrieve.
Property Value:The RadSliderItem at the specified index in the current RadSliderItemCollection.
Methods
Appends the specified RadSliderItem object to the end of the current RadSliderItemCollection.
public virtual void Add(RadSliderItem item)
The RadSliderItem to append to the end of the current RadSliderItemCollection.
protected override void AddItemToParentControls(int index, ControlItem item)
Overrides:
Appends the specified array of RadSliderItem objects to the end of the current RadSliderItemCollection.
public virtual void AddRange(IEnumerable<RadSliderItem> items)
items
The array of <xref href="Telerik.Web.UI.RadSliderItem?text=RadSliderItem" data-throw-if-not-resolved="false"></xref> to append to the end of the current
Determines whether the specified RadSliderItem object is in the current RadSliderItemCollection.
public virtual bool Contains(RadSliderItem item)
The RadSliderItem object to find.
Returns:true if the current collection contains the specified RadSliderItem object;
otherwise, false.
Searches the items in the collection for a RadSliderItem which contains the specified attribute and attribute value.
public RadSliderItem FindItemByAttribute(string attributeName, string attributeValue)
The name of the target attribute.
attributeValuestringThe value of the target attribute
Returns:The RadSliderItem that matches the specified arguments. Null (Nothing) is returned if no node is found.
Finds the first RadSliderItem with Text that matches the given text value.
public RadSliderItem FindItemByText(string text)
The string to search for.
Returns:The first RadSliderItem that matches the specified text value.
Finds the first RadSliderItem with Value that matches the given value.
public RadSliderItem FindItemByValue(string value)
The value to search for.
Returns:The first RadSliderItem that matches the specified value.
Determines the index of the specified RadSliderItem object in the collection.
public virtual int IndexOf(RadSliderItem item)
The RadSliderItem to locate.
Returns:The zero-based index of item within the current RadSliderItemCollection, if found; otherwise, -1.
Inserts the specified RadSliderItem object in the current RadSliderItemCollection at the specified index location.
public virtual void Insert(int index, RadSliderItem item)
The zero-based index location at which to insert the RadSliderItem.
itemRadSliderItemThe RadSliderItem to insert.
protected override void OnClear()
Overrides:
Removes the specified RadSliderItem object from the current RadSliderItemCollection.
public virtual void Remove(int index)
The zero-based index of the index to remove.
Removes the specified RadSliderItem object from the current RadSliderItemCollection.
public virtual void Remove(RadSliderItem item)
The RadSliderItem object to remove.