Represents a collection that stores the grid rows
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class GridViewRowCollection : IEnumerable, INotifyCollectionChanged
Inheritance: objectGridViewRowCollection
Implements:
Constructors
Initializes a new instance of the GridViewRowCollection class.
Properties
Gets a value indicating whether the ICollection<T> is read-only.
public bool IsReadOnly { get; }
Gets the owner.
public GridViewTemplate Owner { get; }
The owner.
Gets or sets the GridViewRowInfo at the specified index.
Methods
Adds an item to the ICollection<T>.
public void Add(GridViewRowInfo item)
The object to add to the ICollection<T>.
Exceptions:The ICollection<T> is read-only.
Adds a new row to the rows collection.
Adds the range.
public virtual void AddRange(params GridViewRowInfo[] rows)
The rows.
Removes all items from the ICollection<T>.
Determines whether the ICollection<T> contains a specific value.
public bool Contains(GridViewRowInfo item)
The object to locate in the ICollection<T>.
Returns:true if item is found in the ICollection<T>; otherwise, false.
public void CopyTo(GridViewRowInfo[] array, int arrayIndex)
The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.
array is null.
arrayIndex is less than 0.
array is multidimensional.
-or-
arrayIndex is equal to or greater than the length of array.
-or-
The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.
-or-
Type T cannot be cast automatically to the type of the destination array.
Returns an enumerator that iterates through the collection.
public IEnumerator<GridViewRowInfo> GetEnumerator()
IEnumerator<GridViewRowInfo>
A IEnumerator<T> that can be used to iterate through the collection.
Determines the index of a specific item in the IList<T>.
public int IndexOf(GridViewRowInfo item)
The object to locate in the IList<T>.
Returns:The index of item if found in the list; otherwise, -1.
Inserts an item to the IList<T> at the specified index.
public void Insert(int index, GridViewRowInfo item)
The zero-based index at which item should be inserted.
The object to insert into the IList<T>.
Exceptions:index is not a valid index in the IList<T>.
The IList<T> is read-only.
Create new row. The new row is not added to collection.
Raises the event.
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
The NotifyCollectionChangedEventArgs instance containing the event data.
Removes the first occurrence of a specific object from the ICollection<T>.
public bool Remove(GridViewRowInfo item)
The object to remove from the ICollection<T>.
Returns:true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.
The ICollection<T> is read-only.
Removes the IList<T> item at the specified index.
public void RemoveAt(int index)
The zero-based index of the item to remove.
Exceptions:index is not a valid index in the IList<T>.
The IList<T> is read-only.
Events
Occurs when the collection changes.
public event NotifyCollectionChangedEventHandler CollectionChanged
Implements: