-1
I have this Remove Item Button, only it only triggers after two Clicks, but I would like to remove the item on the first click.
<Label VerticalAlignment="Center" FontSize="18" FontWeight="DemiBold" Margin="0,10,0,0" Content="Produtos Já Adicionados:"/>
<syncfusion:SfDataGrid ItemsSource="{Binding Itens}" BorderThickness="0" BorderBrush="Transparent" CurrentCellEndEdit="SfDataGrid_OnCurrentCellEndEdit" AutoGenerateColumns="False" RowHeight="40" Margin="0,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="130" MaxHeight="150" x:Name="Grid2" >
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridImageColumn ValueBinding="{Binding Produto.Imagem}" HeaderText="Imagem" ImageWidth="40" ImageHeight="40" Width="55" HeaderTemplate="{StaticResource SfHeaderF}" HeaderStyle="{StaticResource SfHeaderStyle}"/>
<syncfusion:GridTextColumn MappingName="Produto.Nome" HeaderText="Produto" Width="120" TextWrapping="Wrap" HeaderTemplate="{StaticResource SfHeader}" HeaderStyle="{StaticResource SfHeaderStyle}"/>
<syncfusion:GridTextColumn MappingName="Quantidade" HeaderText="QTD" Width="40" TextWrapping="Wrap" AllowEditing="True" HeaderTemplate="{StaticResource SfHeader}" HeaderStyle="{StaticResource SfHeaderStyle}" />
<syncfusion:GridTextColumn ValueBinding="{Binding Produto.Preco, Converter={StaticResource RealConverter}}" HeaderText="Vlr. UN" Width="80" TextWrapping="Wrap" HeaderTemplate="{StaticResource SfHeader}" HeaderStyle="{StaticResource SfHeaderStyle}"/>
<syncfusion:GridTextColumn ValueBinding="{Binding Total, Converter={StaticResource RealConverter}}" HeaderText="Total" Width="70" TextWrapping="Wrap" HeaderTemplate="{StaticResource SfHeader}" HeaderStyle="{StaticResource SfHeaderStyle}"/>
<syncfusion:GridTextColumn ValueBinding="{Binding .}" HeaderTemplate="{StaticResource SfHeaderL}" HeaderStyle="{StaticResource SfHeaderStyle}">
<syncfusion:GridTextColumn.CellTemplate>
<DataTemplate>
<Button Content="Remover" Background="{StaticResource ColorCancel}" HorizontalAlignment="Center" Margin="5" Padding="5" Foreground="AntiqueWhite" Command="{Binding DataContext.RemoverItemCommand2, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type syncfusion:SfDataGrid}}}" CommandParameter="{Binding .}"/>
</DataTemplate>
</syncfusion:GridTextColumn.CellTemplate>
</syncfusion:GridTextColumn>
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>