# Row

## Content



A grid control is a collection of rows and columns. Columns generally contain a particular type of information through out, while rows are used to record different types of information about a particular item. In FlexGrid, the collection of rows is represented by the RowCollection class which can be accessed through **Rows** property of the **FlexGrid** class. The following section discusses how to add a new row in a grid using new row template.

In .NET, FlexGrid provides the **NewRowPosition** property in the **FlexGrid** class, which sets a value that indicates whether the new row template should be displayed at the bottom or at the top of the grid, or should not be displayed. This property depends on the **GridNewRowPosition** enumeration which specifies where to display the new row template when the grid is bound to a data source. Furthermore, the **NewRowPosition** property has an effect only when the grid is bound to a data source that supports adding new items.

| ![](https://cdn.mescius.io/document-site-files/images/3ca88af8-b501-48d7-a446-601c9251a2fb/images/newrowposition.gif) |
| --- |

The following code can be used to display a new row template that lets you add a row in FlexGrid. This example uses the sample used in [Quick Start](/componentone/docs/wpf/online-flexgrid/FlexGridQuickStart) topic.

```csharp
grid_code.NewRowPosition = GridNewRowPosition.Top;
```


> type=note
> **Note**: In .NET Framework, you can implement this feature by using the functionalities of both **AllowAddNew** and **NewRowPosition** properties.