问题标签 [xamdatagrid]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
2221 浏览

c# - Infragistics XamDataGrid 特殊分组

如何将字段布局设置为 XamDataGrid,如下所示: 预期布局

欢迎任何想法,通过分组或使用主细节。

0 投票
3 回答
4113 浏览

c# - xamDataGrid 过滤器记录样式

我正在尝试更改 xamDataGrid 中过滤器记录的背景颜色。

我已经<SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, AddRowBackground}" Color="Red"/>按照 Infragistics 论坛上的建议进行了尝试,并且

但它们都不起作用,我的过滤器行仍然是白色的。

有任何想法吗?

0 投票
1 回答
7194 浏览

c# - WPF 理解 Selector.IsSynchronizedWithCurrentItem

不知道这是否特定于 Infragistics xamDataGrid 但这里有一个问题:

Infragistics xamDataGrid 公开了一个属性 IsSynchronizedWithCurrentItem,根据他们的文档,该属性将 ActiveRecord 与实现 ICollectionView 的数据源的当前项同步。

我有以下 MasterDetails 窗口,其中包含基于绑定到网格的对象类型的详细信息 (ContentControl) 内容:

在后面的代码中,我试图在我的 MasterDetailsWindow 的构造函数中建立网格数据源的当前项与详细信息控件的 DataContext 之间的链接,如下所示:

在构造 MasterDetails 的实例时,调用者需要提供 detailsControl 对象或表示 DataTemplate 的 URL 的字符串。如果提供了 detailsControl,我将执行检查 details 是否不为空的代码。否则,我假设提供了 DataDetailsTemplate。

我会怀疑我的想法,但如果我构造一个 MasterDetails 窗口的实例,其 URL 可解析为以下 dataTemplate:

在网格中选择一个项目,在 TextBox 中显示所选对象的相应 Message 属性。

但是,如果我提供从 UserControl 派生的自定义 detailsControl 对象,则在网格中选择一个项目不会导致更改我的 detailsControl 的 DataContext。为什么是这样?

TIA。

0 投票
1 回答
7340 浏览

wpf - 根据属性值应用样式

使用 Infragistics XamDataGrid 我遇到了一种情况,我希望仅在设置了某个属性时才应用样式。但是,我认为这更像是一个通用的 WPF/样式问题,而不是特定于 xamDataGrid 的问题。

以下样式是我目前使用的样式。它将复选框添加到记录选择器区域:

TargetType 是 RecordSelector。如果记录是筛选行或添加记录行,我不想显示该复选框。

我想更改它,以便如果记录是添加记录行(IsAddRecord == true),则根本不应用该样式。我希望添加记录行保留其默认样式。

这可能吗?

0 投票
1 回答
537 浏览

wpf - 根据视图中的动作触发视图模型中的命令

我正在使用 Infragistics XamDatagrid。当视图中发生事件(更新新记录)时,我想调用视图模型中的方法。我不能只听 VM 中源的 CollectionChanged 事件,因为一旦用户开始编辑网格中的新行,就会触发该事件。RecordUpdating 事件在用户完成编辑时被调用。

我现在正在做的是直接访问 DataContext 并调用该方法。问题是我找不到任何地方可以将命令附加到可以触发我感兴趣的事件的网格上,这与按钮的命令不同。

通常,当我无法在视图中设置 Command 参数时,从视图调用 VM 的最佳方式是什么?

0 投票
1 回答
1815 浏览

wpf - 为分层 XamDataGrid 着色

我正在使用 XamDataGrid (Infragistics-control) 来显示一些分层数据。我最多可以拥有 10 个级别的对象,并且我需要能够为每个级别赋予特定的背景颜色。我使用 AssigningFieldLayoutToItem 事件来获取项目的“级别”,我想最好也在这里分配背景/样式。

我已尝试指定 DataRecordCellArea 样式甚至 CellValuePresenter 样式,但我无法让其中任何一个与 FieldLayouts 一起使用。

另一种解决方案是为每个级别编写一个 FieldLayout,但这会创建很多不必要的 XAML 代码。

关于我应该做什么的任何建议?

0 投票
1 回答
2631 浏览

cell - Xamdatagrid howto get the current Cell on right click

here is the scenario I want ta achieve on some XamDataGrid

  1. Some Cells may be selected in the grid - cells and not records

  2. User right clicks on a cell in the grid

I would like to add the right clicked cell to the SelectedItems.Cells collection of the XamDataGrid if it was not selected before

BTW - I have no problem getting the entire Record, but what I require is the specific Cell.

any idea?

0 投票
1 回答
1159 浏览

wpf - WPF Infragistics xamDataGrid - CollectionView GroupDescriptions not recognized like with WPF DataGrid

We're looking at upgrading our WPF DataGrid based application to one that uses the Infragistics xamDataGrid DataGrid control.

One of the nice things about the WPF DataGrid was that it looked at GroupDescriptions specified on the CollectionView that wrapped your collection, and automatically created those groups on the DataGrid.

The Infragistics xamDataGrid seems to ignore these group descriptions.

Does anyone know how to get the GroupDescriptions in the ListCollectionView/CollectionView that the xamDataGrid is bound to, to show on the xamDataGrid automatically, or does this require writing additional code?

0 投票
1 回答
3119 浏览

wpf - Ingragistic XamGrid:新记录不可编辑

鉴于,

运行时,我可以在网格顶部看到一个空的新行。但是新行中的所有列都不可编辑!当我将每个字段标记为可编辑时,这些列是可编辑的。

是否可以在“不”明确地将每个字段标记为可编辑的情况下使添加记录功能正常工作?

感谢您的关注。

0 投票
2 回答
4570 浏览

c# - XamDataGrid 列位置索引:Field.Index 或 Field.ActualPosition.Column

让我们假设网格已经绑定到一个数据行并且有多个列。

我发现我可以通过以下方式检索给定的列位置索引:

  • columnField.Index- 如果用户没有更改初始列顺序
  • columnField.ActualPosition.Column- 如果用户更改了初始列顺序

问题是如何知道用户是否更改了初始列顺序?