gpt4 book ai didi

angular - AG 网格在组索引处获取选定的行

转载 作者:太空狗 更新时间:2023-10-29 18:00:28 25 4
gpt4 key购买 nike

注意:网格数据是分组的。

我正在尝试获取特定组索引处的选定行。

我尝试了 getDisplayedRowAtIndex(index).allLeafChildren 并循环遍历每个节点以选择 true,这将提供我需要的内容,但仅限于第一次渲染。

任何想法!如何实现相同?谢谢

最佳答案

你有使用group-key用于目标引用,然后通过 allLeafChildren 循环检查

gridApi.forEachNode((node) => {
if (node.key == 'needed key here') {
node.allLeafChildren.forEach(gNode=>{
if(gNode.selected){
//your logic here
}
});
}
});

关于angular - AG 网格在组索引处获取选定的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53542228/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com