如何将其他数据传递给绑定的数据网格?

时间:2017-07-27 22:51:07

标签: wpf data-binding datagrid

所以说我有一个数据网格绑定到一个对象,有没有办法将一个添加列表/变量传递给它?

具体是:

<DataGrid x:Name="IndoorUnitTable" ItemsSource="{Binding BoundList, Mode=TwoWay, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"   
...
       <DataTemplate x:Name="PropertyFromOtherTable">
             <TextBlock Text="{Binding OtherListIWant, Mode=TwoWay, Converter={StaticResource ConverterForTwoLists}, UpdateSourceTrigger=PropertyChanged}"/>
       </DataTemplate>

1 个答案:

答案 0 :(得分:0)

您必须在Binding中使用ConverterParameter,它将作为参数传递给转换器。我希望我能正确理解你的问题;)

相关问题