简体   繁体   English

AG-GRID 树数据未显示展开行按钮

[英]AG-GRID tree data not showing expand rows button

I am trying to implement angular AG-GRID tree data using ag-grid-angular and ag-grid-enterprise v25.我正在尝试使用 ag-grid-angular 和 ag-grid-enterprise v25 实现 angular AG-GRID 树数据。 I am able to rended the ag-grid tree data but the expand/collapse button is not visible.我能够共享 ag-grid 树数据,但展开/折叠按钮不可见。 and If I double click on a parent row I can expand/collapse.如果我双击父行,我可以展开/折叠。 why the expand/collapse button is not visible?为什么展开/折叠按钮不可见? Do I have to add any CSS file?我是否必须添加任何 CSS 文件? or have to change anything?还是必须改变什么?

HTML: HTML:

<ag-grid-angular #agGrid style="width:  500px; height: 500px;" id="myGrid" class="ag-theme-alpine" [rowData]="rowData"
  [columnDefs]="columnDefs" [defaultColDef]="defaultColDef" [autoGroupColumnDef]="autoGroupColumnDef" [treeData]="true"
  [animateRows]="true" [groupDefaultExpanded]="groupDefaultExpanded" [getDataPath]="getDataPath"
  (gridReady)="onGridReady($event)" [modules]="modules"></ag-grid-angular>

Here is the view:这是视图:

在此处输入图像描述

Ag Grid styles should be imported in styles.scss, can you confirm your doing this. Ag Grid styles 应该导入到 styles.scss 中,你能确认你这样做了吗?

Something like the following:类似于以下内容:

@import "~ag-grid-community/dist/styles/ag-grid.css";
@import "~ag-grid-community/dist/styles/ag-theme-balham.css";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM