FlexGrid for WPF | ComponentOne
Features / Row
In This Topic
    Row
    In This Topic

    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.

    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.

    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 topic.

    C#
    Copy Code
    grid_code.NewRowPosition = GridNewRowPosition.Top;