Datagrid Adding extra value without C # WPF

0

I have the following problem, I have a combobox

 <ComboBox x:Name ="CmbLista"
              ItemsSource="{Binding Path=Lista}" 
              DisplayMemberPath="Descricao"
              SelectedValue="{Binding Path=Model, Mode = TwoWay}"
              Grid.ColumnSpan="20" Margin="5" Grid.Row="1"  VerticalContentAlignment="Center"/>

Here it shows the information correctly. I have a table that shows the user the same information for this I have set up as follows:

<DataGrid Name="GridLista" 
              Grid.ColumnSpan="20" 
              Margin="5" 
              Grid.RowSpan="15" 
              Grid.Row="5"

              AutoGenerateColumns="False" 
              SelectionUnit="FullRow"
              SelectionMode="Extended"
              CanUserReorderColumns="True"

              ItemsSource="{Binding Path=Lista}" 
              SelectedValue="{Binding Path=Model, Mode = TwoWay}"
              >



        <DataGrid.Columns>
            <DataGridTextColumn Binding="{Binding Id}" Header="Id"/>
            <DataGridTextColumn Binding="{Binding Descricao}" Header="Descrição"/>
        </DataGrid.Columns>
    </DataGrid>
When I add the line: ItemsSource="{Binding Path = List}" what happens at the bottom of the list appears a row in the datagrid that does not exist ...

Note that after item 9 has a space

    
asked by anonymous 10.10.2018 / 20:58

0 answers