menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CellSpanInfoCollection<T> - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class CellSpanInfoCollection<T>

    A collection with elements derived from type CellSpanInfoBase. Internally this collection maintains both a List of CellSpanInfoBase and a so called pool. The pool allows immediate lookup of cell spans given a cells row and column index. The list allows looping through cell spans in the order they were added. CellSpanInfoCollection assumes that there is no overlap between cell spans. For any given cell there only at most one cell span must exist. CellSpanInfoCollection is a base class for the grids GridCoveredCellInfoCollection.

    Inheritance
    System.Object
    CellSpanInfoCollection<T>
    CoveredCellInfoCollection
    Implements
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    ISupportInitialize
    Namespace: Syncfusion.UI.Xaml.CellGrid
    Assembly: Syncfusion.SfCellGrid.UWP.dll
    Syntax
    public class CellSpanInfoCollection<T> : Object, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ISupportInitialize where T : CellSpanInfoBase
    Type Parameters
    Name Description
    T

    The element type of this collection.

    Constructors

    CellSpanInfoCollection()

    Declaration
    public CellSpanInfoCollection()

    Properties

    Count

    Gets the number of elements contained in the collection.

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

    IsEmpty

    Gets a value indicating whether this collection is empty.

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

    true if this collection is empty; otherwise, false.

    IsReadOnly

    Gets a value indicating whether the collection is read-only.

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

    Item[Int32]

    Gets or sets the cell span at the specified index.

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

    Methods

    Add(T)

    Adds an item to the collection. An exception is thrown if the cell range overlaps with another cell span in the collection.

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    The object to add to the collection.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The item is null.

    Added(T)

    Declaration
    protected virtual void Added(T item)
    Parameters
    Type Name Description
    T item

    BeginInit()

    Signals the object that initialization is starting.

    Declaration
    public void BeginInit()

    CheckExistCellSpan(CellSpanInfoBase)

    Checks if the cell span exists.

    Declaration
    public bool CheckExistCellSpan(CellSpanInfoBase span)
    Parameters
    Type Name Description
    CellSpanInfoBase span

    The cell span.

    Returns
    Type
    System.Boolean

    Clear()

    Removes all items from the collection.

    Declaration
    public virtual void Clear()

    CollectionModified(List<T>)

    Declaration
    protected virtual void CollectionModified(List<T> spanCollection)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T> spanCollection

    Contains(T)

    Determines whether the collection contains a specific value.

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item

    The object to locate in the collection.

    Returns
    Type Description
    System.Boolean

    true if item is found in the collection; otherwise, false.

    CopyTo(T[], Int32)

    Copies the elements of the collection to an System.Array, starting at a particular System.Array index.

    Declaration
    public void CopyTo(T[] array, int arrayIndex)
    Parameters
    Type Name Description
    T[] array

    The one-dimensional System.Array that is the destination of the elements copied from collection. The System.Array must have zero-based indexing.

    System.Int32 arrayIndex

    The zero-based index in array at which copying begins.

    Exceptions
    Type Condition
    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 collection is greater than the available space from arrayIndex to the end of the destination array cannot be cast automatically to the type of the destination array.

    EndInit()

    Signals the object that initialization is complete.

    Declaration
    public void EndInit()

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>

    A enumerator that can be used to iterate through the collection.

    IndexOf(T)

    Determines the index of a specific item in the collection.

    Declaration
    public int IndexOf(T item)
    Parameters
    Type Name Description
    T item

    The object to locate in the collection.

    Returns
    Type Description
    System.Int32

    The index of item if found in the list; otherwise, -1.

    Insert(Int32, T)

    Inserts an item to the collection at the specified index. An exception is thrown if the cell range overlaps with another cell span in the collection.

    Declaration
    public virtual void Insert(int index, T item)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index at which item should be inserted.

    T item

    The object to insert into the collection.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is not a valid index in the collection.

    System.ArgumentNullException

    The item is null.

    OnGetCellSpan(Int32, Int32, out T)

    This virtual method is called form Syncfusion.UI.Xaml.CellGrid.CellSpanInfoCollection`1.GetCellSpan(System.Int32,System.Int32). Override this method to return a custom cell span that include the specified cells row and column index. In such case you should also return true.

    Declaration
    protected virtual bool OnGetCellSpan(int rowIndex, int columnIndex, out T result)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    T result

    The result cell span.

    Returns
    Type
    System.Boolean

    Remove(T)

    Removes the first occurrence of a specific object from the collection.

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item

    The object to remove from the collection.

    Returns
    Type Description
    System.Boolean

    true if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the original collection.

    RemoveAt(Int32)

    Removes the collection item at the specified index.

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

    The zero-based index of the item to remove.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is not a valid index in the collection.

    System.NotSupportedException

    The collection is read-only.

    Removed(T)

    Declaration
    protected virtual void Removed(T item)
    Parameters
    Type Name Description
    T item

    Implements

    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    ISupportInitialize

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved