Good day!
I try to make DataGrid with empty row by default and if user delete all rows- datagrid shoud add e new empty row.
I try to do this:
<DataGrid AutoGenerateColumns="False" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
Name="dg1"
ItemsSource="{Binding Path=RowColl}"
CanUserAddRows="True"
CanUserDeleteRows="True"
IsEnabled="True"
IsReadOnly="False"
> ...</DataGrid>
At *.xaml.cs:
RowColl = new ObservableCollection<Row>();
dg1.ItemsSource = RowColl;
But no empty row ..
Please, tell me how to get empty row by default and get always 1 row as empty. Thank you!