這裏多個表是綁定到表我的列表視圖:綁定列表視圖使用C#
<ListView x:Name="lvwRpt" HorizontalAlignment="Left" ItemsSource="{Binding Path=BankWithdraw}" Height="335" Margin="23,230,0,0" VerticalAlignment="Top" Width="949" SelectionChanged="lvwRpt_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn Width="0" Header="id" DisplayMemberBinding="{Binding Path=WithdrawID}" />
<GridViewColumn Width="85" Header="Date" DisplayMemberBinding="{Binding Path=Dated}" />
<GridViewColumn Width="85" Header="Acc Code" DisplayMemberBinding="{Binding Path=Account}" />
<GridViewColumn Width="120" Header="Bank Title" DisplayMemberBinding="{Binding Path=Account}" />
<GridViewColumn Width="120" Header="Description" DisplayMemberBinding="{Binding Path=Checknum}" />
<GridViewColumn Width="120" Header="Cheque Num" DisplayMemberBinding="{Binding Path=Checknum}" />
<GridViewColumn Width="115" Header="Ch. Date" DisplayMemberBinding="{Binding Path=CheckDate}" />
<GridViewColumn Width="120" Header="Amount" DisplayMemberBinding="{Binding Path=Amount}" />
</GridView>
</ListView.View>
</ListView>
,但我有WPF窗體。每當一個新的複選框3個複選框被選中,我想對應的新表從數據庫加載的列表視圖中查看。對於每個表而言,列表視圖的標題名稱都是相同的,但綁定「{綁定路徑= _ _}」是不同的。如何實現?
如果我正確理解你的問題,你需要改變ItemSource(BankWithdraw)你的ListView每個複選框點擊事件 – Alekstim
確切地說,看我編輯的問題 –