ClassGridViewRowCollection
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
GridViewRowCollection(GridViewTemplate)
Initializes a new instance of the GridViewRowCollection class.
Declaration
public GridViewRowCollection(GridViewTemplate owner)
Parameters
owner
The owner.
Properties
Count
Gets the number of elements contained in the ICollection<T>.
IsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
Owner
Gets the owner.
Declaration
public GridViewTemplate Owner { get; }
Property Value
The owner.
this[int]
Gets or sets the GridViewRowInfo at the specified index.
Declaration
public GridViewRowInfo this[int index] { get; set; }
Parameters
index
Property Value
Methods
Add(GridViewRowInfo)
Adds an item to the ICollection<T>.
Declaration
public void Add(GridViewRowInfo item)
Parameters
item
The object to add to the ICollection<T>.
Exceptions
The ICollection<T> is read-only.
Add(params object[])
Adds a row to the collection
AddNew()
Adds a new row to the rows collection.
AddRange(params GridViewRowInfo[])
Adds the range.
Declaration
public virtual void AddRange(params GridViewRowInfo[] rows)
Parameters
rows
The rows.
Clear()
Removes all items from the ICollection<T>.
Declaration
public void Clear()
Exceptions
The ICollection<T> is read-only.
Contains(GridViewRowInfo)
Determines whether the ICollection<T> contains a specific value.
Declaration
public bool Contains(GridViewRowInfo item)
Parameters
item
The object to locate in the ICollection<T>.
Returns
true if item is found in the ICollection<T>; otherwise, false.
CopyTo(GridViewRowInfo[], int)
Declaration
public void CopyTo(GridViewRowInfo[] array, int arrayIndex)
Parameters
array
The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndex
The zero-based index in array at which copying begins.
Exceptions
array is null.
arrayIndex is less than 0.
<code class="paramref">array</code> 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.
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<GridViewRowInfo> GetEnumerator()
Returns
IEnumerator<GridViewRowInfo>
A IEnumerator<T> that can be used to iterate through the collection.
IndexOf(GridViewRowInfo)
Determines the index of a specific item in the IList<T>.
Declaration
public int IndexOf(GridViewRowInfo item)
Parameters
item
The object to locate in the IList<T>.
Returns
The index of item if found in the list; otherwise, -1.
Insert(int, GridViewRowInfo)
Inserts an item to the IList<T> at the specified index.
Declaration
public void Insert(int index, GridViewRowInfo item)
Parameters
index
The zero-based index at which item should be inserted.
item
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.
Move(int, int)
Moves a specified row in unbound mode
NewRow()
Create new row. The new row is not added to collection.
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the event.
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
args
NotifyCollectionChangedEventArgs
The NotifyCollectionChangedEventArgs instance containing the event data.
Remove(GridViewRowInfo)
Removes the first occurrence of a specific object from the ICollection<T>.
Declaration
public bool Remove(GridViewRowInfo item)
Parameters
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>.
Exceptions
The ICollection<T> is read-only.
RemoveAt(int)
Removes the IList<T> item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
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
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Value
Implements