Hi All,
I have some XAML like this (silverlight 3.0),
<data:DataGrid Margin="0,20,0,0" ItemsSource="{Binding Path=Upgrades}" =
AutoGenerateColumns="False" VerticalAlignment="Center"
AlternatingRowBackground="AliceBlue" HorizontalAlignment="Left"
SelectionMode="Single">
<data:DataGrid.RowStyle>
<Style TargetType="data:DataGridRow">
<Setter Property="IsSelected" Value="{Binding Path=IsSelected}"/>
</Style>
</data:DataGrid.RowStyle>
<data:DataGrid.Columns>
<data:DataGridTextColumn Header="Product Version" Binding="{Binding Path=ProductVersion}"/>
<data:DataGridTextColumn Header="Upgrade Version" Binding="{Binding Path=UpgradeVersion}"/>
<data:DataGridTextColumn Header="Description" Binding="{Binding Path=UpgradeDescription}" Width="350"/>
<data:DataGridTextColumn Header="Database Lock Required" Binding="{Binding Path=DatabaseLockRequired}"></data:DataGridTextColumn>
</data:DataGrid.Columns>
</data:DataGrid>
So basically I have an observable list of upgrade view model classes which is the property called 'Upgrades' you can see there. Each upgrade view model class has the properties there that are being bound to (e.g. ProductVersion etc).
I also added a property called IsSelected. I wanted to bind that property so that when you select an item in the grid view it automatically gets set. There doesn't appear to be a property called IsSelected on the DataGridRow class.
I think the example above would work in WPF when using a ListView.