Skip to main content

Lesson 3 - Add New Item Row

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

To allow end-users to add new records, show the New Item Row in the grid.

Open the HelloGrid solution created in Lesson 2 of the current Getting Started tutorial and set the GridControl.NewItemRowVisibility property to true.

<dxGrid:GridControl x:Name="grid" ItemsSource="{Binding Orders}" 
                   NewItemRowVisibility="true" >
    <!-- ... -->
</dxGrid:GridControl>

The New Item Row will be shown above grid’s rows. When an end-user taps it, a row editor (an in-place editor or edit form, depending on the row edit mode set in the grid) is invoked. After an end-user sets required cell values in this editor and taps Apply (or Done), a new row is added.

Grid_GettingStarted_Lesson3_Result_iPad

Grid_GettingStarted_Lesson3_Result_Android_Dark

Go on to Lesson 4 of the current Getting Started tutorial to learn how to group data in the grid.