# Column Pinning

Develop powerful and lightweight web applications using ASP.NET MVC controls. Learn more about the ComponentOne MVC controls in ASP.NET MVC documentation.

## Content



FlexGrid allows you to pin columns to the left of the grid so they remain visible as you scroll the grid horizontally. Pinning the columns adds pin glyphs to the column headers and clicking the pin glyph freezes (or unfreezes) the columns. To pin columns in FlexGrid, you can use [PinningType](/componentone/api/mvc/online-mvc/dotnet-framework-api/C1.Web.Mvc/C1.Web.Mvc.FlexGridBase-1.PinningType.html) property of the FlexGrid class. This property accepts value from the [PinningType](/componentone/api/mvc/online-mvc/dotnet-framework-api/C1.Web.Mvc/C1.Web.Mvc.Grid.PinningType.html) enumeration, which are described as follows:

*   **None** : This values does not allow pinning columns
*   **SingleColumn** : Allows pinning and unpinning one column at a time
*   **ColumnRange** : Allows pinning and unpinning column ranges
*   **Both** : Allows pinning and unpinning single columns or column ranges. This can also be achieved using the Shift key.

![Pinning a range of columns](https://cdn.mescius.io/document-site-files/images/2b3ac322-100e-4637-958d-fb40dcda3f44/images/pinning.png)

To pin a column range in FlexGrid, use the following code. This example uses the sample code used in [Quick Start](/componentone/docs/mvc/online-mvc/workwithcontrols/FlexGrid/FlexGridQuickStart).

```csharp
.PinningType(PinningType.ColumnRange)
```