Class GridCellInfoCollection
A collection that stores 'GridCellInfo' objects.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridCellInfoCollection : CollectionBase, IList, ICollection, IEnumerable, ISerializable
Constructors
GridCellInfoCollection()
Initializes a new instance of the Syncfusion.Windows.Forms.Grid.GridCellInfoCollectionEditor class.
Declaration
public GridCellInfoCollection()
GridCellInfoCollection(SFTable)
Initializes a new instance of the GridCellInfoCollection class based on an existing Data object.
Declaration
public GridCellInfoCollection(SFTable newdata)
Parameters
Type | Name | Description |
---|---|---|
SFTable | newdata | The Data to construct the new collection. |
GridCellInfoCollection(GridCellInfo[])
Initializes a new instance of 'GridCellInfoCollection' with an array of 'GridCellInfo' objects.
Declaration
public GridCellInfoCollection(GridCellInfo[] griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo[] | griValue | An array of 'GridCellInfo' objects with which to initialize the collection |
GridCellInfoCollection(GridCellInfoCollection)
Initializes a new instance of 'GridCellInfoCollection' based on an already existing instance.
Declaration
public GridCellInfoCollection(GridCellInfoCollection griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfoCollection | griValue | A 'GridCellInfoCollection' from which the contents is copied |
GridCellInfoCollection(GridData)
Initializes a new instance of the GridCellInfoCollection class based on an existing GridData object.
Declaration
public GridCellInfoCollection(GridData gdata)
Parameters
Type | Name | Description |
---|---|---|
GridData | gdata | The Data to construct the new collection. |
GridCellInfoCollection(SerializationInfo, StreamingContext)
Initializes a new instance ofGridCellInfoCollection from a serialization stream.
Declaration
protected GridCellInfoCollection(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. |
Properties
Item[Int32]
Gets or sets the 'GridCellInfo' item at the specified index position.
Declaration
public GridCellInfo this[int intIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intIndex | The zero-based index of the entry to locate in the collection. |
Property Value
Type | Description |
---|---|
GridCellInfo | The entry at the specified index of the collection. |
Methods
Add(GridCellInfo)
Adds a 'GridCellInfo' item with the specified value to the 'GridCellInfoCollection'
Declaration
public int Add(GridCellInfo griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo | griValue | The 'GridCellInfo' to add. |
Returns
Type | Description |
---|---|
System.Int32 | The index at which the new element was inserted. |
AddRange(GridCellInfo[])
Copies the elements of an array at the end of this instance of 'GridCellInfoCollection'.
Declaration
public void AddRange(GridCellInfo[] griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo[] | griValue | An array of 'GridCellInfoCollection' objects to add to the collection. |
AddRange(GridCellInfoCollection)
Adds the contents of another 'GridCellInfoCollection' at the end of this instance.
Declaration
public void AddRange(GridCellInfoCollection griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfoCollection | griValue | A 'GridCellInfoCollection' containing the objects to add to the collection. |
Contains(GridCellInfo)
Gets a value indicating whether the 'GridCellInfoCollection' contains the specified value.
Declaration
public bool Contains(GridCellInfo griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo | griValue | The item to locate. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item exists in the collection; false otherwise. |
CopyTo(GridCellInfo[], Int32)
Copies the 'GridCellInfoCollection' values to a one-dimensional System.Array instance starting at the specified array index.
Declaration
public void CopyTo(GridCellInfo[] griArray, int intIndex)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo[] | griArray | The one-dimensional System.Array that represents the copy destination. |
System.Int32 | intIndex | The index in the array where copying begins. |
GetEnumerator()
Returns an enumerator that can be used to iterate through the 'GridCellInfoCollection'.
Declaration
public GridCellInfoCollection.GridCellInfoEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
GridCellInfoCollection.GridCellInfoEnumerator | An enumerator. |
Examples
This example shows how to get the enumerator for the collection.
//Getting the enumerator.
GridCellInfoCollection.GridCellInfoEnumerator cells = this.gridControl1.GridCells.GetEnumerator();
'Getting the enumerator.
Dim cells As GridCellInfoCollection.GridCellInfoEnumerator= Me.gridControl1.GridCells.GetEnumerator()
GetObjectData(SerializationInfo, StreamingContext)
Returns the data needed to serialize the GridCellInfoCollection.
Declaration
protected 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. |
IndexOf(GridCellInfo)
Returns the index of a 'GridCellInfo' object in the collection.
Declaration
public int IndexOf(GridCellInfo griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo | griValue | The 'GridCellInfo' object whose index will be retrieved. |
Returns
Type | Description |
---|---|
System.Int32 | If found, the index of the value; otherwise, -1. |
Insert(Int32, GridCellInfo)
Inserts an existing 'GridCellInfo' into the collection at the specified index.
Declaration
public void Insert(int intIndex, GridCellInfo griValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intIndex | The zero-based index where the new item should be inserted. |
GridCellInfo | griValue | The item to insert. |
OnInsert(Int32, Object)
TODO: Describe what custom processing this method does before inserting a new item in the collection
Declaration
protected override void OnInsert(int intIndex, object objValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intIndex | Index value. |
System.Object | objValue | Object value. |
Overrides
OnSet(Int32, Object, Object)
TODO: Describe what custom processing this method does before setting an item in the collection
Declaration
protected override void OnSet(int intIndex, object objOldValue, object objNewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intIndex | Index value. |
System.Object | objOldValue | Old object value. |
System.Object | objNewValue | New object value. |
Overrides
Remove(GridCellInfo)
Removes a specific item from the 'GridCellInfoCollection'.
Declaration
public void Remove(GridCellInfo griValue)
Parameters
Type | Name | Description |
---|---|---|
GridCellInfo | griValue | The item to remove from the 'GridCellInfoCollection'. |
Explicit Interface Implementations
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Implements the ISerializable interface and returns the data needed to serialize the GridCellInfoCollection.
Declaration
void ISerializable.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. |