【问题标题】:How to filter data from DataTable and assign as itemsSource to DataGrid如何从 DataTable 中过滤数据并作为 itemsSource 分配给 DataGrid
【发布时间】:2011-06-23 12:52:03
【问题描述】:

我正在使用 .net 4.0 和 VS2010,C# WPF 应用程序
我有数据表填充数据库中的数据。我想在某些条件下对其进行过滤,并希望将过滤后的数据用作 WPF DataGrid 的 DataContext
谁能证明我是一个简单的例子

【问题讨论】:

    标签: wpf datagrid datatable


    【解决方案1】:

    创建一个DataView 并将其用作DataGrid 的DataContext。将过滤器和排序条件添加到DataView。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-03
      • 2012-08-10
      • 2011-08-14
      • 2011-08-23
      • 1970-01-01
      • 1970-01-01
      • 2021-05-07
      • 1970-01-01
      相关资源
      最近更新 更多