ag-grid单元格级别复选框 [英] ag-grid cell level checkbox select

查看:553
本文介绍了ag-grid单元格级别复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示所有行,所有带有复选框的列,因为我只想要true / false值。但是我想访问单个单元格值,即可以选中/取消选中每个复选框。参见下图。

I want to show all rows, all columns with checkbox as I want only true/false value. But I want to access single cell value i.e. each of the checkbox can be checked/unchecked. see image below.

据我所知当我勾选复选框时,将选中该行的所有复选框。因此,我可以选中/取消选中单个框吗?

As per my knowledge when I tick checkbox, all checkboxes of row get selected. So, can I check/uncheck single box?

推荐答案

我也试图找出其今天的工作方式。我发现,最好的方法是创建一个新组件并使用 cellRendererFramework 而不是 cellRenderer

I was trying to find out how it works today as well. What i could find out was, that the best way is to create a new Component and use cellRendererFramework instead of cellRenderer.

这里是一个StackBlitz,例如:

Here is a StackBlitz with an example:

Stackblitz示例ag-grid中的复选框

*更新了Stackblitz示例以显示如何同时更新基础模型!谢谢提示!

*Updated the Stackblitz example to show how to update the underlying model as well! Thank you for the hint!

这篇关于ag-grid单元格级别复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆