【问题标题】:how to enable summaries only for selected rows in xamdatagrid?如何仅对 xamdatagrid 中的选定行启用摘要?
【发布时间】:2012-06-15 16:47:44
【问题描述】:

我正在使用 infragistices 网格开发 wpf 应用程序。我搜索了 infragistics 论坛,谷歌搜索并没有找到任何东西,我确实发现 devExpress 网格确实支持this,但找不到类似的 infragistics 解决方案对应

我正在尝试查看是否有一种方法可以使摘要仅在用户选择行时才起作用?任何有关如何使其工作的帮助将不胜感激 有没有人尝试过任何这样的条件汇总计算

【问题讨论】:

    标签: wpf xaml infragistics xamdatagrid


    【解决方案1】:

    如果您的网格位于变量 dataGrid 中,则此 LINQ 应该可以工作

        /// <summary>
        /// Gets a readonly list of the filtered selected records.
        /// </summary>
        public IList<DataRecord> SelectedRecords
        {
            get
            {
                return dataGrid.Records.Cast<DataRecord>().Where(r => r.IsFilteredOut != true && r.IsSelected && !r.IsDeleted).ToList().AsReadOnly();
            }
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-15
      • 2016-02-11
      相关资源
      最近更新 更多