# GridViewRowInfo

**GridViewRowInfo** class is the logical representation of a single row. Some of the significant properties include:

* **IsEditable:** The row can be edited.

* **IsExpanded:** This property indicates if the row has been expanded when the row is a grouping header row or when displaying hierarchy.

* [IsPinned](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/pinned-rows): Can be pinned to the top of the grid so the row will always be visible, even when scrolling.

* [IsSelected](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/selected-rows-and-current-row): If set to *true* the row is selected.

* **Height:** The height of the row in pixels.

* [IsCurrent](https://www.telerik.com/products/winforms/documentation/controls/gridview/visual-elements/rows/selected-rows-and-current-row): If set to *true* the row is selected.

* **AllowResize:** If  *true*, the height of the row can be resized. If **False** the splitter mouse cursor does not display and the row is prevented from being resized.

* **IsVisible:** Determines whether the row is visible. Note this is NOT related to scrolling but visible in general.

`GridViewRowInfo` also has an **EnsureVisible** method that scrolls a row into view.

The example below demonstrates the behavior of several of these properties:

![WinForms RadGridView Customized Row](https://www.telerik.com/products/winforms/documentation/assets/98c90ee44362908eb2c24b8764be1eeb/gridview-rows-gridviewrowinfo001.png)

#### Using GridViewRowInfo

```C#
            GridViewRowInfo lastRow = radGridView1.Rows[radGridView1.Rows.Count - 1];
            lastRow.EnsureVisible();
            lastRow.IsSelected = true;
            lastRow.Height = 100;
            lastRow.AllowResize = false;
```

```VB.NET
Dim lastRow As GridViewRowInfo = RadGridView1.Rows(RadGridView1.Rows.Count - 1)
lastRow.EnsureVisible()
lastRow.IsSelected = True
lastRow.Height = 100
lastRow.AllowResize = False
```

### Difference between GridViewInfo.Rows and GridViewTemplate.Rows

One **GridViewTemplate** corresponds to one DataSource. As its name speaks, it is a template and it defines the structure of the data presented - the number, order, header text and other properties of the columns. In addition it has properties for user interaction - *AllowAddNewRow*, *ShowColumnHeaders*, etc. On the other side, you may have several **GridViewInfo's**(views) for one DataSource. In a RadGridView displaying flat data, there is one **GridViewTemplate** and one **GridViewInfo** for one DataSource. Therefore, you will find that some of their properties will return one and the same values. In order to understand the actual difference, let's analyze the case of hierarchical grid with 2 levels of hierarchy - one parent and one child levels. Since there are two DataSources in this case, there are two **GridViewTemplates** - one per level. These **GridViewTemplates** govern the data structure properties. However, you may have several **GridViewInfos** for one **GridViewTemplate** - if you have three rows of the **MasterTemplate** expanded, you will have three GridViewInfos for the child GridViewTemplate.

**GridViewInfo.Rows** are a subset of **GridVIewTemplate.Rows**. The subset is created dynamically so it is slower operation.

## 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)

* [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)

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