2017-07-27 56 views
0

所以說我有一個數據網格綁定到一個對象,它有任何方式來傳遞一個加法列表/變量?如何將附加數據傳遞給綁定的數據網格?

明確:

<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> 
+0

你的問題很不清楚。你是否想要組合這些列表,以便表中的行數將成爲每個列表中行的總和?或者你是否想加入列表,使表中的列數是兩個列表中列的總和?每種方法都需要不同的方法。 – AQuirky

+0

你的問題不清楚。 – AnjumSKhan

回答

0

您必須使用ConverterParameter在你的綁定,這將傳遞到轉換器的參數。我希望我能正確理解你的問題;)