WPF datagrid empty row at bottom WPF datagrid empty row at bottom wpf wpf

WPF datagrid empty row at bottom


Sounds like you probably have CanUserAddRows set to true for the DataGrid. Just add

CanUserAddRows="false"

to the XAML.


It also works with the attribute:

IsReadOnly="true"


If your backing collection that implements IEditableCollectionView returns true from its CanAddNew method, the DataGrid will assume that is what you want to do.

There's a good overview here:Overview of the editing features in the WPF DataGrid