How to: Enable the New Item Row Feature
- 2 minutes to read
The following example demonstrates how to enable the New Item Row feature.
Tip
Topic: Add and Remove Rows
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-add-a-new-row-using-the-new-item-row-e1025.
<Window x:Class="NewItemRow.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:local="clr-namespace:NewItemRow"
Title="Window1" Height="400" Width="500">
<DockPanel LastChildFill="True">
<dxg:GridControl x:Name="grid" AutoGenerateColumns="AddNew">
<dxg:GridControl.View>
<dxg:TableView x:Name="view" AutoWidth="True" NewItemRowPosition="Top" />
</dxg:GridControl.View>
</dxg:GridControl>
</DockPanel>
</Window>