0
我有一個Silverlight DataGrid綁定到PagedCollectionView。如果我簡單地綁定DataGrid,則SelectionChanged事件觸發。但是,如果我添加一個DataPager來處理數據網格,DataGrid上的所有事件除了加載時第一行都會觸發。這是我的代碼:Silverlight DataGrid事件未觸發
<sdk:DataGrid Cursor="Hand" IsReadOnly="True" x:Name="dgImports" AutoGenerateColumns="False">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Binding="{Binding ImportID}" Width="0" Visibility="Collapsed"/>
<sdk:DataGridTextColumn Binding="{Binding Sequence}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Sequence Number" Width="Auto" />
<sdk:DataGridTextColumn Binding="{Binding CreateDate}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Create Date" Width="Auto" />
<sdk:DataGridTextColumn Binding="{Binding Error}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Error" Width="Auto" />
</sdk:DataGrid.Columns>
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction
Command="{Binding SelectionChangedCommand}"
CommandParameter="{Binding SelectedItem, ElementName=dgImports}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</sdk:DataGrid>
<sdk:DataPager x:Name="dgImportsPager"
Source="{Binding Path=ItemsSource, ElementName=dgImports}"
PageSize="20" />
任何線索?