WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridRowCollection - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridRowCollection

    Implements a two-dimensional table that holds an array of GridCellCollection arrays with GridStyleInfoStore items.

    Inheritance
    System.Object
    SFTable
    GridRowCollection
    Implements
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    SFTable.Clear()
    SFTable.InsertRows(Int32, Int32)
    SFTable.InsertCols(Int32, Int32)
    SFTable.RemoveRows(Int32, Int32)
    SFTable.RemoveCols(Int32, Int32)
    SFTable.MoveRows(Int32, Int32, Int32)
    SFTable.MoveCols(Int32, Int32, Int32)
    SFTable.Contains(Int32, Int32)
    SFTable.Rows
    SFTable.RowCount
    SFTable.ColCount
    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: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridRowCollection : SFTable, ICloneable, ISerializable, IList, ICollection, IEnumerable
    Remarks

    This is a memory efficient way to represent a table where values can remain empty. Only rows that actually contain data will allocate a GridCellCollection and the array only holds as many GridStyleInfoStoreobjects as the specific row contains columns.

    When you access data that are out of range, an empty () object will be returned. If you set data that are out of range, an exception will be thrown. If you set data for a row that was empty, the row will be allocated before the value is stored.

    GridRowCollection provides methods that let you insert, remove, or rearrange columns or rows in the table.

    Constructors

    GridRowCollection()

    Initializes a new instance of the GridRowCollection class that is empty.

    Declaration
    public GridRowCollection()

    GridRowCollection(SFTable)

    Initializes a new instance of the GridRowCollection class from an existing table. References to cell objects will be copied into this table from the original table.

    Declaration
    public GridRowCollection(SFTable data)
    Parameters
    Type Name Description
    SFTable data

    The original table.

    Remarks

    For each row in the original table, a GridCellCollection is added to this GridRowCollection and the references to the cell objects will be copied into the new GridCellCollection.

    GridRowCollection(SerializationInfo, StreamingContext)

    Initializes a new instance of the GridRowCollection class from the specified instances of the System.Runtime.Serialization.SerializationInfo and System.Runtime.Serialization.StreamingContext classes.

    Declaration
    protected GridRowCollection(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    An instance of the System.Runtime.Serialization.SerializationInfo class containing the information required to serialize the new GridRowCollection instance.

    System.Runtime.Serialization.StreamingContext context

    An instance of the System.Runtime.Serialization.StreamingContext class containing the source of the serialized stream associated with the new GridRowCollection instance.

    Remarks

    This constructor implements the System.Runtime.Serialization.ISerializable interface for the GridRowCollection class.

    Properties

    Count

    Gets the number of row elements in this array.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    IsFixedSize

    Gets a value indicating whether IsFixedSize. Always false.

    Declaration
    public bool IsFixedSize { get; }
    Property Value
    Type Description
    System.Boolean

    IsReadOnly

    Gets a value indicating whether the array is Read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    System.Boolean

    IsSynchronized

    Gets a value indicating whether access to the collection is synchronized.

    Declaration
    public bool IsSynchronized { get; }
    Property Value
    Type Description
    System.Boolean

    Item[Int32]

    Gets or sets a GridCellCollection object at the specified row index.

    Declaration
    public GridCellCollection this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based row index.

    Property Value
    Type Description
    GridCellCollection

    Item[Int32, Int32]

    Gets or sets a GridStyleInfoStore object at the specified coordinates in the GridRowCollection.

    Declaration
    public GridStyleInfoStore this[int rowIndex, int colIndex] { get; set; }
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The zero-based row index.

    System.Int32 colIndex

    The zero-based column index.

    Property Value
    Type Description
    GridStyleInfoStore
    Remarks

    If you query for an element and the coordinates are out of range, an empty (null) object will be returned.

    If you set an element and the coordinates are out of range, an exception is thrown.

    SyncRoot

    Gets not supported.

    Declaration
    public object SyncRoot { get; }
    Property Value
    Type Description
    System.Object

    Methods

    Add(GridCellCollection)

    Adds a GridCellCollection to the array.

    Declaration
    public int Add(GridCellCollection value)
    Parameters
    Type Name Description
    GridCellCollection value

    Value to add.

    Returns
    Type Description
    System.Int32

    The position into which the value was inserted

    Clone()

    Creates a deep copy of the GridRowCollection where each row and cell object is cloned.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    A deep copy of the GridRowCollection.

    Overrides
    SFTable.Clone()

    Contains(GridCellCollection)

    Determines if the array contains the specified GridCellCollection.

    Declaration
    public bool Contains(GridCellCollection value)
    Parameters
    Type Name Description
    GridCellCollection value

    Value to search.

    Returns
    Type Description
    System.Boolean

    true if [contains] [the specified value]; otherwise, false.

    CopyTo(GridCellCollection[], Int32)

    Copied references of row elements to the specified array, starting at a particular index.

    Declaration
    public void CopyTo(GridCellCollection[] array, int index)
    Parameters
    Type Name Description
    GridCellCollection[] array

    The target collection.

    System.Int32 index

    The starting index.

    CreateCellCollection()

    Creates an empty GridCellCollection.

    Declaration
    public override SFArrayList CreateCellCollection()
    Returns
    Type Description
    SFArrayList

    An empty GridCellCollection.

    Overrides
    SFTable.CreateCellCollection()

    GetEnumerator()

    Returns an enumerator for the list of rows.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An enumerator.

    GetObjectData(SerializationInfo, StreamingContext)

    Returns the data needed to serialize the SFTable.

    Declaration
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    A System.Runtime.Serialization.SerializationInfo object containing the information required to serialize the object.

    System.Runtime.Serialization.StreamingContext context

    A System.Runtime.Serialization.StreamingContext object containing the source and destination of the serialized stream.

    Overrides
    SFTable.GetObjectData(SerializationInfo, StreamingContext)

    IndexOf(GridCellCollection)

    Determines the index of the specified GridCellCollection in the array.

    Declaration
    public int IndexOf(GridCellCollection value)
    Parameters
    Type Name Description
    GridCellCollection value

    The value whose index needs to be retrieved.

    Returns
    Type Description
    System.Int32

    returns Index.

    Insert(Int32, GridCellCollection)

    Inserts a GridCellCollection at the specified row index.

    Declaration
    public void Insert(int index, GridCellCollection value)
    Parameters
    Type Name Description
    System.Int32 index

    Row index.

    GridCellCollection value

    Value to insert.

    Remove(GridCellCollection)

    Removes the GridCellCollection from the array.

    Declaration
    public void Remove(GridCellCollection value)
    Parameters
    Type Name Description
    GridCellCollection value

    Value to remove

    RemoveAt(Int32)

    Removes the GridCellCollection at the specified row index.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the value to be removed.

    Explicit Interface Implementations

    ICollection.CopyTo(Array, Int32)

    Declaration
    void ICollection.CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array
    System.Int32 index

    IList.Add(Object)

    Declaration
    int IList.Add(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    System.Int32

    IList.Clear()

    Declaration
    void IList.Clear()

    IList.Contains(Object)

    Declaration
    bool IList.Contains(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    System.Boolean

    IList.get_Item(Int32)

    Declaration
    object IList.get_Item(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Object

    IList.IndexOf(Object)

    Declaration
    int IList.IndexOf(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    System.Int32

    IList.Insert(Int32, Object)

    Declaration
    void IList.Insert(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object value

    IList.Item[Int32]

    Gets or sets the element at the specified index.

    Declaration
    object IList.this[] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to get or set.

    Returns
    Type Description
    System.Object

    The element at the specified index.

    IList.Remove(Object)

    Declaration
    void IList.Remove(object value)
    Parameters
    Type Name Description
    System.Object value

    IList.set_Item(Int32, Object)

    Declaration
    void IList.set_Item(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object value

    Implements

    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.MoveTo(IList, Int32, Int32)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])

    See Also

    GridCellCollection
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved