(I've looked far and wide for a Q&A before asking, but please forgive if it's already around somewhere else and I missed it.)
I'm just trying to do something that seemingly should be simple... trying to map individual checkboxes in a telerik:GridViewSelectColumn in a telerik:RadGridView to a corresponding Boolean property of an entity mapped for each individual row.
<telerik:RadGridView x:Name="MyGridView" ItemsSource="{Binding MyGridViewItems, Mode=TwoWay}" SelectionMode="Extended" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewSelectColumn Name="MyCheckBoxColumn">
<telerik:GridViewSelectColumn.CellTemplate>
<DataTemplate>
<CheckBox Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewDataControl}}, Path=DataContext.IncludeChangedCommand}" CommandParameter="{Binding}" IsChecked="{Binding MyBooleanProperty, Mode=TwoWay}" />
</DataTemplate>
</telerik:GridViewSelectColumn.CellTemplate>
</telerik:GridViewSelectColumn>
.
.
.
</telerik:RadGridView.Columns>
</telerik:RadGridView>
How do I map MyBooleanProperty to each individual checkbox?
Aucun commentaire:
Enregistrer un commentaire