【发布时间】:2022-01-27 19:53:05
【问题描述】:
我正在尝试绑定 groupDisplayType 属性,但看起来该属性已在最新版本的 Ag-Grid 中被删除。我正在使用 25.1.0。
<ag-grid-angular
[columnDefs]="columnDefs"
[groupDisplayType]="groupDisplayType"
/* other grid options ... */>
</ag-grid-angular>
错误:
NG8002: Can't bind to 'groupDisplayType' since it isn't a known property of 'ag-grid-angular'.
1. If 'ag-grid-angular' is an Angular component and it has 'groupDisplayType' input, then verify that it is part of this module.
2. If 'ag-grid-angular' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
6 [groupDisplayType]="groupDisplayType"
Ag-grid 网站上有一些在线示例,但它们似乎使用的是旧版本的 ag-grid。
有没有其他方法可以绑定groupDisplayType?
【问题讨论】:
-
文档仍然说它是网格的有效属性。您的模块是否正确导入 AgGridModule?
-
是的,我再次验证了。它已按照ag-grid.com/angular-data-grid/getting-started 实施。我也可以使用所有其他 ag-grid 企业版属性。
标签: angular ag-grid ag-grid-angular