I am working on WPF, I am designing a control that contains a datagrid, And everything goes well so far.
But something weird just happend: If I show one or more rows in the data grid, the datagrid shows at the end the blank row used to add new rows, as normal, BUT if there is no rows in the data grid, the blank row is not showed either!.
So, I need my datagrid to have always at the end the blank row whether or not data.
I have tried with the properties CanUserAddRows and IsReadOnly but as I said before it only works when there is one or more rows.
Does anybody know how to achieve this?
Thank you in advance.
Do you mean blank row? Have a look at the answers on wpf datagrid blank row missing
This basic set-up does display a blank row (even when bound ItemsSource has no data)
XAML
Code behind