2010-12-01 58 views

回答

2

这应该工作:

<sdk:DataGrid ItemsSource="{Binding Items}" x:Name="MyGrid" Height="100" VerticalAlignment="Top"/> 
     <ComboBox 
      x:Name="Results" 
      Margin="0,100" 
      SelectedItem="{Binding SelectedItem, ElementName=MyGrid, Mode=TwoWay}" 
      ItemsSource="{Binding Items}"> 
     </ComboBox> 

您的组合框的选择项绑定到数据网格的选择项。这是通过ElementName完成的。

希望这会有所帮助。

TJ

+0

我的一个问题是IE在刷新表单时没有重新加载新的zap。解决方案非常相似 David 2010-12-03 01:47:42

相关问题