---
description: Wisej.Web.ColumnStyle
---

# ColumnStyle

Namespace: **Wisej.Web**

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

* [TableLayoutStyle](wisej.web.tablelayoutstyle)
  * [ColumnStyle](wisej.web.columnstyle)

Represents the look and feel of a column in a table layout.

{% tabs %}
{% tab title="C#" %}
```csharp
public class ColumnStyle : TableLayoutStyle
```
{% endtab %}

{% tab title="VB.NET" %}
```visual-basic
Public Class ColumnStyle
    Inherits TableLayoutStyle
```
{% endtab %}
{% endtabs %}

## Constructors

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)ColumnStyle()

Initializes an instance of the [ColumnStyle](wisej.web.columnstyle) class to its default state.

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)ColumnStyle(style)

Initializes and instance of the [ColumnStyle](wisej.web.columnstyle) class to its default state.

| Name      | Type                                                                                        | Description                |
| --------- | ------------------------------------------------------------------------------------------- | -------------------------- |
| **style** | [ColumnStyle](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.columnstyle) | Underlying style instance. |

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)ColumnStyle(sizeType)

Initializes an instance of the [ColumnStyle](wisej.web.columnstyle) class using the supplied [SizeType](../../enumerations/wisej.web.sizetype) value.

| Name         | Type                                              | Description                                                                                                                                |
| ------------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **sizeType** | [SizeType](../../enumerations/wisej.web.sizetype) | A [SizeType](../wisej.web.tablelayoutstyle#sizetype) indicating how the column should be should be sized relative to its containing table. |

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)ColumnStyle(sizeType, width)

Initializes and instance of the [ColumnStyle](wisej.web.columnstyle) class using the supplied [SizeType](../../enumerations/wisej.web.sizetype) and width values.

| Name         | Type                                                                | Description                                                                                                                                |
| ------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **sizeType** | [SizeType](../../enumerations/wisej.web.sizetype)                   | A [SizeType](../wisej.web.tablelayoutstyle#sizetype) indicating how the column should be should be sized relative to its containing table. |
| **width**    | [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single) | The preferred width, in pixels or percentage, depending on the _sizeType_ parameter.                                                       |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) _width_ is less than 0.

## Properties

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)Width

[Single](https://docs.microsoft.com/en-us/dotnet/api/system.single): Returns or sets the width value for a column.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The value is less than 0 when setting this property.
