menu

WPF

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

    Show / Hide Table of Contents

    Class CellOverlappSpanInfoCollection<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.

    CellOverlappSpanInfoCollection is similar to CellSpanInfoCollection<T> but with the difference that it allows overlaps between cell spans. If a cell has an overlap and GetCellSpans(Int32, Int32) is called for this cell all cell spans will be returned in a list that contain the specified cell.

    CellSpanInfoCollection is a base class for the grids GridCellSpanBackgroundInfoCollection.

    Inheritance
    System.Object
    CellOverlappSpanInfoCollection<T>
    GridCellSpanBackgroundInfoCollection
    Implements
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    System.ComponentModel.ISupportInitialize
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Controls.Cells
    Assembly: Syncfusion.GridCommon.WPF.dll
    Syntax
    public class CellOverlappSpanInfoCollection<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ISupportInitialize where T : CellSpanInfoBase
    Type Parameters
    Name Description
    T

    The element type of this collection.

    Constructors

    CellOverlappSpanInfoCollection()

    Declaration
    public CellOverlappSpanInfoCollection()

    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.

    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.

    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 void Clear()

    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.-or-Type T cannot be cast automatically to the type of the destination array.

    EndInit()

    Signals the object that initialization is complete.

    Declaration
    public void EndInit()

    GetCellSpans(Int32, Int32)

    Gets the list of cell spans that include the specified cells row and column index.

    Declaration
    public List<T> GetCellSpans(int rowIndex, int columnIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    Returns
    Type
    System.Collections.Generic.List<T>

    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.

    Declaration
    public 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.

    InsertColumns(Int32, Int32)

    Updates internal stored cell spans when columns were inserted.

    Declaration
    public void InsertColumns(int insertAtColumnIndex, int count)
    Parameters
    Type Name Description
    System.Int32 insertAtColumnIndex

    The column index.

    System.Int32 count

    The count.

    InsertColumns(Int32, Int32, CellOverlappSpanInfoCollection<T>)

    Updates internal stored cell spans when columns were inserted.

    Declaration
    public void InsertColumns(int insertAtColumnIndex, int count, CellOverlappSpanInfoCollection<T> moveCellsState)
    Parameters
    Type Name Description
    System.Int32 insertAtColumnIndex

    The column index.

    System.Int32 count

    The count.

    CellOverlappSpanInfoCollection<T> moveCellsState

    Temporary state when moving rows.

    InsertRows(Int32, Int32)

    Updates internal stored cell spans when rows were inserted.

    Declaration
    public void InsertRows(int insertAtRowIndex, int count)
    Parameters
    Type Name Description
    System.Int32 insertAtRowIndex

    The row index.

    System.Int32 count

    The count.

    InsertRows(Int32, Int32, CellOverlappSpanInfoCollection<T>)

    Updates internal stored cell spans when rows were inserted.

    Declaration
    public void InsertRows(int insertAtRowIndex, int count, CellOverlappSpanInfoCollection<T> moveCellsState)
    Parameters
    Type Name Description
    System.Int32 insertAtRowIndex

    The row index.

    System.Int32 count

    The count.

    CellOverlappSpanInfoCollection<T> moveCellsState

    Temporary state when moving rows.

    OnGetCellSpans(Int32, Int32, out List<T>)

    This virtual method is called form GetCellSpans(Int32, Int32). Override this method to return a custom list of cell spans that include the specified cells row and column index. In such case you should also return true.

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

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    System.Collections.Generic.List<T> result

    The result list of cell spans.

    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.

    RemoveColumns(Int32, Int32)

    Updates internal stored cell spans when columns were removed.

    Declaration
    public void RemoveColumns(int removeAtColumnIndex, int count)
    Parameters
    Type Name Description
    System.Int32 removeAtColumnIndex

    The column index.

    System.Int32 count

    The count.

    RemoveColumns(Int32, Int32, CellOverlappSpanInfoCollection<T>)

    Updates internal stored cell spans when columns were removed.

    Declaration
    public void RemoveColumns(int removeAtColumnIndex, int count, CellOverlappSpanInfoCollection<T> moveCellsState)
    Parameters
    Type Name Description
    System.Int32 removeAtColumnIndex

    The column index.

    System.Int32 count

    The count.

    CellOverlappSpanInfoCollection<T> moveCellsState

    Temporary state when moving rows.

    RemoveRows(Int32, Int32)

    Updates internal stored cell spans when rows were removed.

    Declaration
    public void RemoveRows(int removeAtRowIndex, int count)
    Parameters
    Type Name Description
    System.Int32 removeAtRowIndex

    The row index.

    System.Int32 count

    The count.

    RemoveRows(Int32, Int32, CellOverlappSpanInfoCollection<T>)

    Updates internal stored cell spans when rows were removed.

    Declaration
    public void RemoveRows(int removeAtRowIndex, int count, CellOverlappSpanInfoCollection<T> moveCellsState)
    Parameters
    Type Name Description
    System.Int32 removeAtRowIndex

    The row index.

    System.Int32 count

    The count.

    CellOverlappSpanInfoCollection<T> moveCellsState

    Temporary state when moving rows.

    ResetCellSpan(CellSpanInfoBase)

    Resets the cell span and removes it from the collection.

    Declaration
    public void ResetCellSpan(CellSpanInfoBase cci)
    Parameters
    Type Name Description
    CellSpanInfoBase cci

    The cci.

    ResetCellSpans(Int32, Int32)

    Resets the cell spans that include this cell and removes it from the collection.

    Declaration
    public void ResetCellSpans(int rowIndex, int columnIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    System.Int32 columnIndex

    Index of the column.

    SearchCellSpans(CellSpanInfoBase)

    Searches the cell span.

    Declaration
    public List<T> SearchCellSpans(CellSpanInfoBase span)
    Parameters
    Type Name Description
    CellSpanInfoBase span

    The cell span.

    Returns
    Type
    System.Collections.Generic.List<T>

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

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

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    System.ComponentModel.ISupportInitialize
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved