Class GridViewRowCollection
Represents a collection that stores the grid rows
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridViewRowCollection : IList<GridViewRowInfo>, ICollection<GridViewRowInfo>, IEnumerable<GridViewRowInfo>, IEnumerable, INotifyCollectionChanged
Constructors
GridViewRowCollection(GridViewTemplate)
Initializes a new instance of the GridViewRowCollection class.
Declaration
public GridViewRowCollection(GridViewTemplate owner)
Parameters
GridViewTemplate
owner
The owner. |
Properties
Count
Gets the number of elements contained in the System.Collections.Generic.ICollection<T>.
Declaration
public int Count { get; }
Property Value
System.Int32
|
Implements
IsReadOnly
Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean
|
Implements
Item[Int32]
Gets or sets the GridViewRowInfo at the specified index.
Declaration
public GridViewRowInfo this[int index] { get; set; }
Parameters
System.Int32
index
|
Property Value
GridViewRowInfo
|
Implements
Owner
Gets the owner.
Declaration
public GridViewTemplate Owner { get; }
Property Value
GridViewTemplate
The owner. |
Methods
Add(Object[])
Adds a row to the collection
Declaration
public int Add(params object[] values)
Parameters
System.Object[]
values
A variable number of objects that populate the cells of the new GridViewRowInfo. |
Returns
System.Int32
The sorted index of the new row. |
Add(GridViewRowInfo)
Adds an item to the System.Collections.Generic.ICollection<T>.
Declaration
public void Add(GridViewRowInfo item)
Parameters
GridViewRowInfo
item
The object to add to the System.Collections.Generic.ICollection<T>. |
Implements
Exceptions
System.NotSupportedException
The System.Collections.Generic.ICollection<T> is read-only. |
AddNew()
Adds a new row to the rows collection.
Declaration
public GridViewRowInfo AddNew()
Returns
GridViewRowInfo
An instance GridViewRowInfo |
AddRange(GridViewRowInfo[])
Adds the range.
Declaration
public virtual void AddRange(params GridViewRowInfo[] rows)
Parameters
GridViewRowInfo[]
rows
The rows. |
Clear()
Removes all items from the System.Collections.Generic.ICollection<T>.
Declaration
public void Clear()
Implements
Exceptions
System.NotSupportedException
The System.Collections.Generic.ICollection<T> is read-only. |
Contains(GridViewRowInfo)
Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.
Declaration
public bool Contains(GridViewRowInfo item)
Parameters
GridViewRowInfo
item
The object to locate in the System.Collections.Generic.ICollection<T>. |
Returns
System.Boolean
true if |
Implements
CopyTo(GridViewRowInfo[], Int32)
Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(GridViewRowInfo[] array, int arrayIndex)
Parameters
GridViewRowInfo[]
array
The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<T>. The System.Array must have zero-based indexing. |
System.Int32
arrayIndex
The zero-based index in |
Implements
Exceptions
System.ArgumentNullException
|
System.ArgumentOutOfRangeException
|
System.ArgumentException
|
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<GridViewRowInfo> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<GridViewRowInfo>
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
Implements
IndexOf(GridViewRowInfo)
Determines the index of a specific item in the System.Collections.Generic.IList<T>.
Declaration
public int IndexOf(GridViewRowInfo item)
Parameters
GridViewRowInfo
item
The object to locate in the System.Collections.Generic.IList<T>. |
Returns
System.Int32
The index of |
Implements
Insert(Int32, GridViewRowInfo)
Inserts an item to the System.Collections.Generic.IList<T> at the specified index.
Declaration
public void Insert(int index, GridViewRowInfo item)
Parameters
System.Int32
index
The zero-based index at which |
GridViewRowInfo
item
The object to insert into the System.Collections.Generic.IList<T>. |
Implements
Exceptions
System.ArgumentOutOfRangeException
|
System.NotSupportedException
The System.Collections.Generic.IList<T> is read-only. |
Move(Int32, Int32)
Moves a specified row in unbound mode
Declaration
public void Move(int oldIndex, int newIndex)
Parameters
System.Int32
oldIndex
The old index of the row. |
System.Int32
newIndex
The new index of the row. |
NewRow()
Create new row. The new row is not added to collection.
Declaration
public GridViewRowInfo NewRow()
Returns
GridViewRowInfo
|
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged event.
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
The NotifyCollectionChangedEventArgs instance containing the event data. |
Remove(GridViewRowInfo)
Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<T>.
Declaration
public bool Remove(GridViewRowInfo item)
Parameters
GridViewRowInfo
item
The object to remove from the System.Collections.Generic.ICollection<T>. |
Returns
System.Boolean
true if |
Implements
Exceptions
System.NotSupportedException
The System.Collections.Generic.ICollection<T> is read-only. |
RemoveAt(Int32)
Removes the System.Collections.Generic.IList<T> item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
System.Int32
index
The zero-based index of the item to remove. |
Implements
Exceptions
System.ArgumentOutOfRangeException
|
System.NotSupportedException
The System.Collections.Generic.IList<T> is read-only. |
Events
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
NotifyCollectionChangedEventHandler
|
Implements
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
|