menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridIndexDictionary - API Reference

    Show / Hide Table of Contents

    Class GridIndexDictionary

    Implements a collection with index / value pairs stored in a System.Collections.Hashtable and lets you insert, remove, or move values in the collection and indexes will be updated.

    Inheritance
    System.Object
    TypedDictionaryBase
    GridIndexDictionary
    Implements
    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    Inherited Members
    TypedDictionaryBase.Clear()
    TypedDictionaryBase.CopyTo(Array, Int32)
    TypedDictionaryBase.GetEnumerator()
    TypedDictionaryBase.IEnumerable.GetEnumerator()
    TypedDictionaryBase.OnClear()
    TypedDictionaryBase.OnGet(Object, Object)
    TypedDictionaryBase.IDictionary.Add(Object, Object)
    TypedDictionaryBase.IDictionary.Contains(Object)
    TypedDictionaryBase.IDictionary.get_Item(Object)
    TypedDictionaryBase.IDictionary.set_Item(Object, Object)
    TypedDictionaryBase.IDictionary.Remove(Object)
    TypedDictionaryBase.IDictionary.Item[Object]
    TypedDictionaryBase.Keys
    TypedDictionaryBase.Values
    TypedDictionaryBase.Count
    TypedDictionaryBase.Dictionary
    TypedDictionaryBase.InnerHashtable
    TypedDictionaryBase.IsReadOnly
    TypedDictionaryBase.IsFixedSize
    TypedDictionaryBase.IsSynchronized
    TypedDictionaryBase.SyncRoot
    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 GridIndexDictionary : TypedDictionaryBase, IDictionary, ICollection, IEnumerable, ICloneable, ISerializable
    Remarks

    GridModelHideRowColsIndexer and GridModelRowColSizeIndexer store row, column sizes, and hidden states in a GridIndexDictionary.

    Constructors

    GridIndexDictionary(Hashtable, Type)

    Initializes a new instanceGridIndexDictionary and specifies the hash table and type of values this collection holds.

    Declaration
    protected GridIndexDictionary(Hashtable hashtable, Type memberType)
    Parameters
    Type Name Description
    System.Collections.Hashtable hashtable

    The inner hash table to be associated with this GridIndexDictionary.

    System.Type memberType

    The type of values this collection holds.

    GridIndexDictionary(SerializationInfo, StreamingContext)

    Initializes a new instanceGridIndexDictionary from a serialization stream.

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

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

    System.Runtime.Serialization.StreamingContext context

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

    GridIndexDictionary(Type)

    Initializes a new instance ofGridIndexDictionary and specifies the type of values this collection holds.

    Declaration
    public GridIndexDictionary(Type memberType)
    Parameters
    Type Name Description
    System.Type memberType

    The type of values this collection holds.

    Properties

    Item[Int32]

    Gets or sets the value at the specified index.

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

    LargestKey

    Gets the largest index in the collection.

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

    MemberType

    Gets the MemberType. Used internally.

    Declaration
    public Type MemberType { get; }
    Property Value
    Type Description
    System.Type

    SmallestKey

    Gets the smallest index in the collection.

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

    Methods

    Add(Int32, Object)

    Adds an index / value pair.

    Declaration
    public void Add(int key, object value)
    Parameters
    Type Name Description
    System.Int32 key

    The index for the value.

    System.Object value

    The value.

    Clone()

    Creates an exact copy of this GridIndexDictionary.

    Declaration
    public GridIndexDictionary Clone()
    Returns
    Type Description
    GridIndexDictionary

    A GridIndexDictionary with all values copied over.

    Contains(Int32)

    Checks if the collection has an entry at the specified index.

    Declaration
    public bool Contains(int key)
    Parameters
    Type Name Description
    System.Int32 key

    The index for the value.

    Returns
    Type Description
    System.Boolean

    True if a value exists at the index; False otherwise.

    CopyTo(Object[], Int32)

    Copies the values to a one-dimensional System.Array instance at the specified index.

    Declaration
    public void CopyTo(object[] array, int index)
    Parameters
    Type Name Description
    System.Object[] array

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

    System.Int32 index

    The index in the array where copying begins.

    GetHashTable()

    Gets the hash table. Used internally.

    Declaration
    public Hashtable GetHashTable()
    Returns
    Type Description
    System.Collections.Hashtable

    returns Hash table.

    GetObjectData(SerializationInfo, StreamingContext)

    Implements the ISerializable interface and returns the data needed to serialize the GridIndexDictionary.

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

    A SerializationInfo object containing the information required to serialize the object.

    System.Runtime.Serialization.StreamingContext context

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

    InsertIndex(Int32, Int32)

    Inserts a specified number of values at a specific index and adjusts the index for subsequent values.

    Declaration
    public void InsertIndex(int index, int count)
    Parameters
    Type Name Description
    System.Int32 index

    The index where to start inserting values.

    System.Int32 count

    The number of values to insert.

    Lookup(Int32, out Int32)

    Determines if a System.Int32 value is stored at a specific index and returns its value.

    Declaration
    public bool Lookup(int key, out int result)
    Parameters
    Type Name Description
    System.Int32 key

    The index to look up.

    System.Int32 result

    The value at the specified index.

    Returns
    Type Description
    System.Boolean

    True if value exists; False otherwise.

    Lookup(Int32, out Object)

    Determines if a System.Object value is stored at a specific index and returns its value.

    Declaration
    public bool Lookup(int key, out object obj)
    Parameters
    Type Name Description
    System.Int32 key

    The index to look up.

    System.Object obj

    The value at the specified index.

    Returns
    Type Description
    System.Boolean

    True if value exists; False otherwise.

    Lookup(Int32, out Single)

    Determines if a System.Single value is stored at a specific index and returns its value.

    Declaration
    public bool Lookup(int key, out float result)
    Parameters
    Type Name Description
    System.Int32 key

    The index to look up.

    System.Single result

    The value at the specified index.

    Returns
    Type Description
    System.Boolean

    True if value exists; False otherwise.

    MoveIndex(Int32, Int32, Int32)

    Moves a specified number of values to a new index and adjusts the indexes of subsequent values.

    Declaration
    public void MoveIndex(int from, int count, int dest)
    Parameters
    Type Name Description
    System.Int32 from

    The index where to start moving values.

    System.Int32 count

    The number of values to move.

    System.Int32 dest

    The destination index.

    OnInsert(Object, Object)

    Invoked when the Key and value pair inserted into the dictionary.

    Declaration
    protected override void OnInsert(object key, object value)
    Parameters
    Type Name Description
    System.Object key

    Key value.

    System.Object value

    Corresponding value of that key.

    Overrides
    TypedDictionaryBase.OnInsert(Object, Object)

    OnRemove(Object, Object)

    Invoked when the Key and value pair removed from the dictionary.

    Declaration
    protected override void OnRemove(object key, object value)
    Parameters
    Type Name Description
    System.Object key

    Key value.

    System.Object value

    Corresponding value of that key.

    Overrides
    TypedDictionaryBase.OnRemove(Object, Object)

    OnSet(Object, Object, Object)

    Sets the new value.

    Declaration
    protected override void OnSet(object key, object oldValue, object newValue)
    Parameters
    Type Name Description
    System.Object key
    System.Object oldValue
    System.Object newValue
    Overrides
    TypedDictionaryBase.OnSet(Object, Object, Object)

    OnValidate(Object, Object)

    Validates the key,value pair in the dictionary.

    Declaration
    protected override void OnValidate(object key, object value)
    Parameters
    Type Name Description
    System.Object key
    System.Object value
    Overrides
    TypedDictionaryBase.OnValidate(Object, Object)
    Exceptions
    Type Condition
    System.ArgumentException

    if key is Negative.

    Remove(Int32)

    Removes the value at the specified index.

    Declaration
    public void Remove(int key)
    Parameters
    Type Name Description
    System.Int32 key

    The Index.

    RemoveIndex(Int32, Int32)

    Removes a specified number of values at a specific index and adjusts the index for subsequent values.

    Declaration
    public void RemoveIndex(int from, int count)
    Parameters
    Type Name Description
    System.Int32 from

    The index where to start removing values.

    System.Int32 count

    The number of values to remove.

    Explicit Interface Implementations

    ICloneable.Clone()

    Creates a new object that is a copy of the current instance.

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    System.Object

    A new object that is a copy of this instance.

    Implements

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

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    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 - 2023 Syncfusion Inc. All Rights Reserved