# Pinned Rows

RadGridView rows can be pinned so that the rows appear anchored to the top or bottom of the grid. To pin a particular row, set the row **PinPosition** to one of the enumerated options -PinnedRowPosition.**Bottom** or PinnedRowPosition.**Top**:

```C#
radGridView1.Rows[0].PinPosition = PinnedRowPosition.Bottom;
radGridView1.Rows[4].PinPosition = PinnedRowPosition.Top;
```

```VB.NET
RadGridView1.Rows(0).PinPosition = PinnedRowPosition.Bottom
RadGridView1.Rows(4).PinPosition = PinnedRowPosition.Top
```

By using this code the **IsPinned** property automatically gets a value true for the desired row.

Another way of pinning a row is to set directly the **IsPinned** property of a Rows collection item to True. Please note that doing so will pin the row to the top of RadGridView.

```C#
radGridView1.Rows[3].IsPinned = true;
```

```VB.NET
RadGridView1.Rows(3).IsPinned = True
```

The example below shows pinning all selected rows in the grid:

```C#
foreach (GridViewRowInfo row in radGridView1.SelectedRows)
{
    row.PinPosition = PinnedRowPosition.Bottom;
}
```

```VB.NET
For Each row In RadGridView1.SelectedRows
    row.PinPosition = PinnedRowPosition.Bottom
Next
```

**RadGridView** rows can be pinned so that the rows appear anchored to the top of the grid. To pin a particular row, set the **IsPinned** property of a **Rows** collection item to  *true*.

The example below shows pinning rows in the grid.<br> ![WinForms RadGridView Pinned Rows](https://www.telerik.com/products/winforms/documentation/assets/766bfcedbd0c65115c8ba3993c01aeaf/gridview-rows-pinned-rows002.png)

## See Also

* [Adding and Inserting Rows](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/adding-and-inserting-rows)

* [Conditional Formatting Rows](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/conditional-formatting-rows)

* [Creating custom rows](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/creating-custom-rows)

* [Drag and Drop](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/drag-and-drop)

* [Formatting Rows](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/formatting-rows)

* [GridViewRowInfo](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/gridviewrowinfo)

* [Iterating Rows](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/iterating-rows)

* [New Row](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/new-row)
