I use a SfDataGrid and i have 2 template column with pickers.
The problem is that i don't know how to get the selected value of these pickers in my viewModel
<?xml version="1.0" encoding="utf-8" ?>
<controls:KerhisContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Kerhis.Domopig.View.Views.MouvementAnimauxPage"
x:Name="this"
xmlns:controls="clr-namespace:Kerhis.Core.Forms.Controls;assembly=Kerhis.Core.Forms"
xmlns:cr="clr-namespace:Kerhis.Domopig.View.Controls;assembly=Kerhis.Domopig.View"
xmlns:syncfusion="clr-namespace:Syncfusion.SfDataGrid.XForms;assembly=Syncfusion.SfDataGrid.XForms"
BindingContext="{Binding MouvementAnimaux, Source={StaticResource Locator}}"
Title="Mouvements Animaux">
<controls:KerhisContentPage.Content>
<ScrollView>
<StackLayout VerticalOptions="FillAndExpand">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Source="salle.png" Grid.Column="0" Grid.Row="0"/>
<Label Text="Nom de la salle : " FontSize="Medium" HorizontalOptions="Start" VerticalOptions="Center" Grid.Column="1" Grid.Row="0"/>
<Label Text="{Binding Salle.LibelleSalle}" FontSize="Medium" HorizontalOptions="Start" VerticalOptions="Center" Grid.Column="2" Grid.Row="0"/>
<Label Text="Batiment : " FontSize="Medium" HorizontalOptions="End" VerticalOptions="Center" Grid.Column="3" Grid.Row="0"/>
<Label Text="{Binding Salle.Batiment.LibelleBatiment}" FontSize="Medium" HorizontalOptions="Start" VerticalOptions="Center" Grid.Column="4" Grid.Row="0"/>
<Label Text="Site : " FontSize="Medium" HorizontalOptions="End" VerticalOptions="Center" Grid.Column="5" Grid.Row="0"/>
<Label Text="{Binding Salle.Site.LibelleSite}" FontSize="Medium" HorizontalOptions="Start" VerticalOptions="Center" Grid.Column="6" Grid.Row="0"/>
<Image Source="cochon.png" Grid.Column="0" Grid.Row="1"/>
<Label Text="{Binding NombreAnimaux}" FontSize="Medium" HorizontalOptions="Start" VerticalOptions="Center" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1"/>
</Grid>
<cr:KerhisDataGrid AutoGenerateColumns="False"
ItemsSource="{Binding ListeMouvementAnimaux}"
ColumnSizer="Star"
SelectionMode="SingleDeselect"
VerticalOptions="FillAndExpand">
<cr:KerhisDataGrid.Columns x:TypeArguments="syncfusion:Columns">
<syncfusion:GridTextColumn HeaderText="Date"
MappingName="DateMouvement"
TextWrapping="WordWrap"/>
<syncfusion:GridTextColumn HeaderText="Effectif J-1"
MappingName="AncienEffectif"
TextWrapping="WordWrap"/>
<syncfusion:GridTextColumn HeaderText="Effectif J-J"
MappingName="EffectifActuel"
TextWrapping="WordWrap"/>
<syncfusion:GridTextColumn HeaderText="Différence"
MappingName="Difference"
TextWrapping="WordWrap"/>
<syncfusion:GridTemplateColumn HeaderText="Qualification"
MappingName="CodeQualificationMouvement"
TextWrapping="WordWrap">
<syncfusion:GridTemplateColumn.CellTemplate>
<DataTemplate>
<controls:KerhisPicker HorizontalOptions="FillAndExpand"
ItemsSource="{Binding BindingContext.Qualifications, Source={x:Reference this}}"
VerticalOptions="Center"/>
</DataTemplate>
</syncfusion:GridTemplateColumn.CellTemplate>
</syncfusion:GridTemplateColumn>
<syncfusion:GridTemplateColumn HeaderText="N° Bon Uniporc associé"
MappingName="IDBordereau"
TextWrapping="WordWrap">
<syncfusion:GridTemplateColumn.CellTemplate>
<DataTemplate>
<controls:KerhisPicker HorizontalOptions="FillAndExpand"
ItemsSource="{Binding BindingContext.ListeBordereaux, Source={x:Reference this}}"
VerticalOptions="Center"
IsEnabled="{Binding BindingContext.Enabled, Source={x:Reference this}}"/>
</DataTemplate>
</syncfusion:GridTemplateColumn.CellTemplate>
</syncfusion:GridTemplateColumn>
<syncfusion:GridTextColumn HeaderText="Commentaire"
MappingName="Commentaire"
TextWrapping="WordWrap"/>
</cr:KerhisDataGrid.Columns>
</cr:KerhisDataGrid>
</StackLayout>
</ScrollView>
</controls:KerhisContentPage.Content>
</controls:KerhisContentPage>