[英]enable edit for cell field at row grouping level ag-grid
I have created an ag-grid.我创建了一个 ag-grid。 where I am grouping the records as row grouping.
我将记录分组为行分组。 In that grid, one column is autocompleting typeahead drop-down column I have used the below package to implement it.
在该网格中,一列是自动完成预先输入的下拉列,我使用下面的 package 来实现它。
https://www.npmjs.com/package/ag-grid-autocomplete-editor https://www.npmjs.com/package/ag-grid-autocomplete-editor
currently, it looks like this.目前,它看起来像这样。 since I have done the grouping I am unable to show typeahead col at group level.
因为我已经完成了分组,所以我无法在组级别显示 typeahead col。 I want to autocomplete typeahead here for bulk (group level) update.
我想在这里自动完成输入以进行批量(组级别)更新。
I tried multiple ways but unable to do it.我尝试了多种方法,但无法做到。 I tried using aggFunc also unable to since I am using another package.
我尝试使用 aggFunc 也无法使用,因为我使用的是另一个 package。 Which should return something like:
应该返回如下内容:
cellEditor: AutoCompleteSelectCellEditor, cellRendererParams: {values: this.getData.bind(this)}, valueFormatter: ...
I am unsure of how this will work.我不确定这将如何工作。 Any help would be very much appreciated.
任何帮助将不胜感激。
After googling for a couple of days.谷歌搜索了几天后。 I found the solution.
我找到了解决方案。
We can achieve this by adding.我们可以通过添加来实现这一点。
enableGroupEdit={true}
Also, At the column level, we need to add此外,在列级别,我们需要添加
editable: true
or或者
editable: {this.isCellEditable}
and we can have a function isCellEditable(param)
to enable editable dynamically based on requirements.我们可以有一个 function
isCellEditable(param)
来根据需求动态启用可编辑。
enableGroupEdit={true}
we can control which field to allow by calling a function that returns a boolean.我们可以通过调用返回 boolean 的 function 来控制允许哪个字段。
enableGroupEdit = {(params) => myfunction(params)}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.