menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class WorksheetModelCollection - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class WorksheetModelCollection

    Represents a collection of WorksheetModel objects.

    Inheritance
    System.Object
    System.Collections.CollectionBase
    WorksheetModelCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.IDisposable
    System.Runtime.Serialization.ISerializable
    Inherited Members
    System.Collections.CollectionBase.Capacity
    System.Collections.CollectionBase.Clear()
    System.Collections.CollectionBase.Count
    System.Collections.CollectionBase.GetEnumerator()
    System.Collections.CollectionBase.InnerList
    System.Collections.CollectionBase.List
    System.Collections.CollectionBase.OnClear()
    System.Collections.CollectionBase.OnInsert(System.Int32, System.Object)
    System.Collections.CollectionBase.OnRemove(System.Int32, System.Object)
    System.Collections.CollectionBase.OnSet(System.Int32, System.Object, System.Object)
    System.Collections.CollectionBase.RemoveAt(System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
    System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
    System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
    System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
    System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
    System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
    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.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class WorksheetModelCollection : CollectionBase, IList, ICollection, IEnumerable, IDisposable, ISerializable

    Constructors

    WorksheetModelCollection()

    Initializes a new instance of the WorksheetModelCollection class.

    Declaration
    public WorksheetModelCollection()

    WorksheetModelCollection(WorksheetModel[])

    Initializes a new instance of the WorksheetModelCollection class containing the specified array of WorksheetModel objects.

    Declaration
    public WorksheetModelCollection(WorksheetModel[] value)
    Parameters
    Type Name Description
    WorksheetModel[] value

    An array of WorksheetModel objects with which to initialize the collection.

    WorksheetModelCollection(WorksheetModelCollection)

    Initializes a new instance of the WorksheetModelCollection class containing the elements of the specified source collection.

    Declaration
    public WorksheetModelCollection(WorksheetModelCollection value)
    Parameters
    Type Name Description
    WorksheetModelCollection value

    A WorksheetModelCollection with which to initialize the collection.

    WorksheetModelCollection(SerializationInfo, StreamingContext)

    Initializes a new WorksheetModelCollection from a serialization stream.

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

    An object that holds all the data needed to serialize or deserialize this instance.

    System.Runtime.Serialization.StreamingContext context

    Describes the source and destination of the serialized stream specified by info.

    Properties

    Item[Int32]

    Gets / sets the WorksheetModel at the specified index.

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

    Updating

    Indicates whether BeginUpdate() was called.

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

    Methods

    Add(WorksheetModel)

    Adds the specified WorksheetModel to the collection.

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

    The WorksheetModel to add.

    Returns
    Type Description
    System.Int32

    The index at which the new element was inserted.

    AddRange(WorksheetModel[])

    Overloaded. Copies the elements of the specified array to the end of the collection.

    Declaration
    public void AddRange(WorksheetModel[] value)
    Parameters
    Type Name Description
    WorksheetModel[] value

    An array of type WorksheetModel containing the objects to add to the collection.

    AddRange(WorksheetModelCollection)

    Adds the contents of another WorksheetModelCollection to the end of the collection.

    Declaration
    public void AddRange(WorksheetModelCollection value)
    Parameters
    Type Name Description
    WorksheetModelCollection value

    A WorksheetModelCollection containing the objects to add to the collection.

    BeginUpdate()

    Suspend updating the display.

    Declaration
    public virtual void BeginUpdate()

    Contains(WorksheetModel)

    Indicates whether the collection contains the specified WorksheetModel.

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

    The WorksheetModel to search for in the collection.

    Returns
    Type Description
    System.Boolean

    langword_csharp_True if the collection contains the specified object; langword_csharp_False otherwise.

    CopyTo(WorksheetModel[], Int32)

    Copies the collection objects to a one-dimensional System.Array instance beginning at the specified index.

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

    The one-dimensional System.Array that is the destination of the values copied from the collection.

    System.Int32 index

    The index of the array at which to begin inserting.

    CreateEmptyWorksheet(WorkbookModel)

    Creates a new empty WorksheetModel and names it "Sheet #".

    Declaration
    public WorksheetModel CreateEmptyWorksheet(WorkbookModel workbook)
    Parameters
    Type Name Description
    WorkbookModel workbook

    The WorkbookModel this new sheet is added to.

    Returns
    Type Description
    WorksheetModel

    The new WorksheetModel.

    Dispose()

    Releases any resources used.

    Declaration
    public void Dispose()

    EndUpdate()

    Resumes updating the display.

    Declaration
    public virtual void EndUpdate()

    IndexOf(WorksheetModel)

    Returns the index in the collection of the specified WorksheetModel, if it exists in the collection.

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

    The WorksheetModel to locate in the collection.

    Returns
    Type Description
    System.Int32

    The index in the collection of the specified object, if found; -1 otherwise.

    IndexOf(String)

    Returns the index of a sheet with the specified name.

    Declaration
    public int IndexOf(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the sheet to find.

    Returns
    Type Description
    System.Int32

    The index of the sheet with the specified name; -1 if not found.

    Insert(Int32, WorksheetModel)

    Inserts the specified WorksheetModel into the collection at the specified index.

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

    The zero-based index where the specified object should be inserted.

    WorksheetModel value

    Move(Int32, Int32)

    Moves a worksheet from one position to another.

    Declaration
    public void Move(int index, int destination)
    Parameters
    Type Name Description
    System.Int32 index

    The original index of the worksheet.

    System.Int32 destination

    The new index of the worksheet.

    OnClearComplete()

    Declaration
    protected override void OnClearComplete()
    Overrides
    System.Collections.CollectionBase.OnClearComplete()

    OnInsertComplete(Int32, Object)

    Declaration
    protected override void OnInsertComplete(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object value
    Overrides
    System.Collections.CollectionBase.OnInsertComplete(System.Int32, System.Object)

    OnRemoveComplete(Int32, Object)

    Declaration
    protected override void OnRemoveComplete(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object value
    Overrides
    System.Collections.CollectionBase.OnRemoveComplete(System.Int32, System.Object)

    OnSetComplete(Int32, Object, Object)

    Declaration
    protected override void OnSetComplete(int index, object oldValue, object newValue)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object oldValue
    System.Object newValue
    Overrides
    System.Collections.CollectionBase.OnSetComplete(System.Int32, System.Object, System.Object)

    OnSheetMoved(Int32, Int32, SheetMovedReason)

    Called when the order of the worksheet has changed.

    Declaration
    protected virtual void OnSheetMoved(int index, int destination, SheetMovedReason reason)
    Parameters
    Type Name Description
    System.Int32 index

    The original index of an affected worksheet.

    System.Int32 destination

    The new index of an affected worksheet

    SheetMovedReason reason

    The reason for the change.

    OnValidate(Object)

    Declaration
    protected override void OnValidate(object value)
    Parameters
    Type Name Description
    System.Object value
    Overrides
    System.Collections.CollectionBase.OnValidate(System.Object)

    Remove(WorksheetModel)

    Removes the specified WorksheetModel from the collection.

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

    The WorksheetModel to remove from the collection.

    Events

    SheetMoved

    Occurs when the order of sheets has been changed.

    Declaration
    public event SheetMovedEventHandler SheetMoved
    Event Type
    Type
    SheetMovedEventHandler

    Explicit Interface Implementations

    ISerializable.GetObjectData(SerializationInfo, StreamingContext)

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

    Implements

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

    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[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved