简体   繁体   English

在ui-grid上选择所有事件时选择组级别行

[英]Selecting group level row on selecting all event on ui-grid

I am trying to react on event when user clicks on select all event on header of ui-grid. 当用户单击ui-grid标题上的select all event时,我试图对事件做出反应。 All rows do get selected, which is expected behavior, but high level group rows are not selected which in my opinion is counter-intuitive for a user. 确实会选中所有行,这是预期的行为,但是没有选择高级组行,我认为这对用户而言是违反直觉的。 You can see example here: http://embed.plnkr.co/rUsK0LfGF3ws8vhsc9sR/ 您可以在此处查看示例: http : //embed.plnkr.co/rUsK0LfGF3ws8vhsc9sR/

例

I know that triggered event is: 我知道触发事件是:

gridApi.selection.on.rowSelectionChangedBatch($scope,function(rows){
          // do something
});

But when I iterate through rows passed to function I don't see the ones that are group level rows so I could select them. 但是,当我遍历传递给函数的行时 ,我看不到属于组级别行的行,因此可以选择它们。 Is there a way to do this? 有没有办法做到这一点?

As per the documentation HERE 根据此处的文档

Group header rows cannot be edited, and if using the selection feature, cannot be selected. 组标题行不能编辑,并且如果使用选择功能,则不能选择。 They can, however, be exported. 但是,可以将其导出。

Have a look at the below screen shot which is taken from Complex grouping found here 看下面的屏幕快照,该屏幕快照取自此处的“复杂”分组 在此处输入图片说明

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

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