【问题标题】:Sort property is omitted from the column state in Aggrid在 Aggrid 的列状态中省略了排序属性
【发布时间】:2021-07-14 07:33:18
【问题描述】:

每当从 agggrid 调用 sortchanged 时,我都会尝试获取列状态

但我只能看到以下属性。我不确定是什么原因。

var colState = gridOptions.columnApi.getColumnState();
<==Property==>
aggFunc: null
colId: "Name"
hide: false
pinned: null
pivotIndex: null
rowGroupIndex: null
width: 200

我正在使用 gridOptions.api.getSortModel(); 但它没有返回 sortIndex。有没有其他方法可以获取 sortIndex,我想知道为什么在执行 gridOptions.columnApi.getColumnState() 时得到的属性很少。 我应该假设根据文档获得以下属性

Aggrid ColumnState documentation

如果有人对此有任何解决方法,请提出建议。

调试后发现了一些东西。列状态中省略了某些属性(排序等)。请打开所附图片。

AG-Grid Ver:ag-grid-enterprise-21.2.1

【问题讨论】:

    标签: ag-grid


    【解决方案1】:

    问题出在我使用的版本上。我尝试使用 25.0.1。现在它工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-11-28
      • 2011-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多