Back to Devexpress

TableView.NewItemRowPosition Property

wpf-devexpress-dot-xpf-dot-grid-dot-tableview-95a00ebf.md

latest5.0 KB
Original Source

TableView.NewItemRowPosition Property

Gets or sets the New Item Row‘s position within a View.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public NewItemRowPosition NewItemRowPosition { get; set; }
vb
Public Property NewItemRowPosition As NewItemRowPosition

Property Value

TypeDefaultDescription
NewItemRowPositionNone

A NewItemRowPosition enumeration value that specifies the New Item Row‘s position within a View.

|

Available values:

NameDescription
None

The new item row is not shown.

| | Top |

The new item row is displayed at the top of the view.

| | Bottom |

The new item row is displayed at the bottom of the view.

|

Remarks

Tip

Topic : Add and Remove Rows

The New Item Row is an empty row at the top or the bottom of the View. Users can enter data into this row to create new rows.

To show the New Item Row , set the NewItemRowPosition property to Top or Bottom.

NewItemRowPosition = Top

NewItemRowPosition = Bottom

Run Demo: New Item Row

The following code snippets (auto-collected from DevExpress Examples) contain references to the NewItemRowPosition property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L26

xml
<dxg:GridControl.View>
    <dxg:TableView NewItemRowPosition="Top" ShowUpdateRowButtons="OnCellEditorOpen"
                   ValidateRow="OnValidateRow" ValidateRowDeletion="OnValidateRowDeletion"

wpf-data-grid-extend-crud-operations/CS/Undo/MainWindow.xaml#L23

xml
<dxg:GridControl.View>
    <dxg:TableView NewItemRowPosition="Top"
                   ShowUpdateRowButtons="OnCellEditorOpen"

wpf-data-grid-initialize-new-item-row-with-default-values/CS/NewItemRow_CodeBehind/MainWindow.xaml#L13

xml
AutoWidth="True"
NewItemRowPosition="Top"
AddingNewRow="OnAddingNewRow"

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L40

xml
ShowFixedTotalSummary="True"
NewItemRowPosition="Top"
ShowUpdateRowButtons="OnCellEditorOpen"

wpf-data-grid-specify-edit-form-settings/CS/DefineEditFormSettings_CodeBehind/MainWindow.xaml#L13

xml
<dxg:GridControl.View>
    <dxg:TableView x:Name="view" EditFormShowMode="InlineHideRow" NewItemRowPosition="Top" RowEditStarting="OnRowEditStarting"/>
</dxg:GridControl.View>

See Also

New Item Row

TableView Class

TableView Members

DevExpress.Xpf.Grid Namespace