DataGridViewSelectedColumnCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (3.5.0.0)
Represents a collection of DataGridViewColumn objects that are selected in a DataGridView.
- C#
- VB.NET
public class DataGridViewSelectedColumnCollection : BaseCollection, IList, IList<DataGridViewColumn>, ICollection<DataGridViewColumn>, IEnumerable<DataGridViewColumn>
Public Class DataGridViewSelectedColumnCollection
Inherits BaseCollection
Implements IList, IList(Of DataGridViewColumn), ICollection(Of DataGridViewColumn), IEnumerable(Of DataGridViewColumn)
Properties
Item(index)
DataGridViewColumn: Returns the column at the specified index.
Throws:
- ArgumentOutOfRangeException index is less than 0; or index is equal to or greater than the number of columns in the collection.
Methods
Contains(column)
Determines whether the specified column is contained in the collection.
| Parameter | Type | Description |
|---|---|---|
| column | DataGridViewColumn | A DataGridViewColumn to locate in the DataGridViewSelectedColumnCollection. |
Returns: Boolean. true if the column parameter is in the collection; otherwise, false.
CopyTo(array, index)
Copies the elements of the collection to the specified array, starting at the specified index.
| Parameter | Type | Description |
|---|---|---|
| array | DataGridViewColumn[] | The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. |
| index | Int32 | The zero-based index in the array at which copying begins. |
Throws:
- ArgumentNullException array is null.
- ArgumentOutOfRangeException index is less than zero.
- ArgumentException array is multidimensional; or the number of elements in the DataGridViewSelectedColumnCollection is greater than the available space from index to the end of array .
- InvalidCastException The DataGridViewSelectedColumnCollection cannot be cast automatically to the type of array .
IndexOf(column)
Returns the index of the specified element.
| Parameter | Type | Description |
|---|---|---|
| column | DataGridViewColumn | The DataGridViewColumn to locate in the collection. |
Returns: Int32. The zero-based index of the column parameter if it is found in the collection; otherwise, -1.