When a record is selected within the xamDataGrid, I want a property named IsSelected on the underlying data item to be set to true. My xamDataGrid has the following resources defined:
<igDP:XamDataGrid.Resources> <Style TargetType="{x:Type igDP:RecordPresenter}" > <Setter Property="IsSelected" Value="{Binding Path=(igDP:DataRecord.DataItem).IsSelected}"/> </Style> <Style TargetType="{x:Type igDP:CellValuePresenter}" > <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="BorderBrush" Value="{StaticResource DataGridCellOuterBorder}" /> <Setter Property="BorderThickness" Value="1,0,0, 0" /> <Setter Property="Padding" Value="5,0,0, 0" /> <Setter Property="FontWeight" Value="Bold" /> <Style.Triggers> <DataTrigger Binding="{Binding Path=(igDP:DataRecord.DataItem).Status}" Value="Acknowledged"> <Setter Property="FontWeight" Value="Normal" /> </DataTrigger> </Style.Triggers> </Style> </igDP:XamDataGrid.Resources>
When I select a record, my data item's IsSelected property is not being set to true.
What am I missing?
TIA,
Klaus
Hi, Did you tried
}">
<!-- To bind selection property to ViewModel Item !!!! -->
=TwoWay}"/>
>
Your proposed works wonderfully. Thanks. Guess I need to read up on the DataPresenter model.