skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class GridViewRowCollection

Represents a collection that stores the grid rows

Inheritance
System.Object
GridViewRowCollection
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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
System.Collections.Generic.ICollection<T>.Count

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
System.Collections.Generic.ICollection<T>.IsReadOnly

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
System.Collections.Generic.IList<T>.Item[System.Int32]

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
System.Collections.Generic.ICollection<T>.Add(T)
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
System.Collections.Generic.ICollection<T>.Clear()
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 item is found in the System.Collections.Generic.ICollection<T>; otherwise, false.

Implements
System.Collections.Generic.ICollection<T>.Contains(T)

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 array at which copying begins.

Implements
System.Collections.Generic.ICollection<T>.CopyTo(T[], System.Int32)
Exceptions
System.ArgumentNullException

array is null.

System.ArgumentOutOfRangeException

arrayIndex is less than 0.

System.ArgumentException

array is multidimensional. -or- arrayIndex is equal to or greater than the length of array. -or- The number of elements in the source System.Collections.Generic.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
System.Collections.Generic.IEnumerator<GridViewRowInfo>

A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

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 item if found in the list; otherwise, -1.

Implements
System.Collections.Generic.IList<T>.IndexOf(T)

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 item should be inserted.

GridViewRowInfo item

The object to insert into the System.Collections.Generic.IList<T>.

Implements
System.Collections.Generic.IList<T>.Insert(System.Int32, T)
Exceptions
System.ArgumentOutOfRangeException

index is not a valid index in the System.Collections.Generic.IList<T>.

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 item was successfully removed from the System.Collections.Generic.ICollection<T>; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection<T>.

Implements
System.Collections.Generic.ICollection<T>.Remove(T)
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
System.Collections.Generic.IList<T>.RemoveAt(System.Int32)
Exceptions
System.ArgumentOutOfRangeException

index is not a valid index in the System.Collections.Generic.IList<T>.

System.NotSupportedException

The System.Collections.Generic.IList<T> is read-only.

Events

CollectionChanged

Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
NotifyCollectionChangedEventHandler

Implements
INotifyCollectionChanged.CollectionChanged

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

Implements
System.Collections.IEnumerable.GetEnumerator()

Extension Methods

CommonExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
CommonExtensions.ContainsAny<T>(IEnumerable<T>, IEnumerable<T>)
CommonExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
CommonExtensions.RemoveLast<T>(IList<T>)
CommonExtensions.EnsureListCountAtLeast<T>(IList<T>, Int32, Func<T>)
CommonExtensions.EnsureListCount<T>(IList<T>, Int32, Func<T>)
CommonExtensions.Clone<T>(IEnumerable<T>)
ExtensionMethodsEditor.CastCovariant<TFrom, TTo>(IEnumerable<TFrom>)
SvgExtentions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.