# TableLayoutColumnStyleCollection

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [TableLayoutStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstylecollection)
  * [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection)

A collection that stores [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) objects.

{% tabs %}
{% tab title="C#" %}

```csharp
public class TableLayoutColumnStyleCollection : TableLayoutStyleCollection
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TableLayoutColumnStyleCollection
    Inherits TableLayoutStyleCollection
```

{% endtab %}
{% endtabs %}

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Item(index)

[ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle): Returns or sets the [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) at the specified index.

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Add(colStyle)

Adds a new [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) to the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection).

| Parameter    | Type                                                                                                  | Description                                                                                                                                                                                                                                                              |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **colStyle** | [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) | The [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) to add to the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection). |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The position into which the new element was inserted.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Contains(colStyle)

Determines whether the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection) contains a specific style.

| Parameter    | Type                                                                                                  | Description                                                                                                                                                                                                                                                                 |
| ------------ | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **colStyle** | [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) | The [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) to locate in the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection). |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) is found in the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection); otherwise, false.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IndexOf(colStyle)

Determines the index of a specific item in the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection).

| Parameter    | Type                                                                                                  | Description                                                                                                                                                                                                                                                                 |
| ------------ | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **colStyle** | [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) | The [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) to locate in the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection). |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The index of *colStyle* if found in the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection); otherwise, -1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Insert(index, colStyle)

Inserts a [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) into the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection) at the specified position.

| Parameter    | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                          |
| ------------ | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **index**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                           | The zero-based index at which the [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) should be inserted.                                                                                                                                          |
| **colStyle** | [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) | The [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) to insert into the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection). The value can be null. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Remove(colStyle)

Removes the first occurrence of a specific object from the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection).

| Parameter    | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                          |
| ------------ | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **colStyle** | [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) | The [ColumnStyle](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) to remove from the [TableLayoutColumnStyleCollection](https://docs.wisej.com/api/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutcolumnstylecollection). The value can be null. |
