AG-Grid: Make editable columns based on response from server

断了今生、忘了曾经 提交于 2019-12-06 19:31:31

I don't really know the structure of Angular, but I think you want something as simple as this:

const columnDefs = [
    {
        headerName: 'Item-Id',
        field: 'your_id_field',
    },
    {
        headerName: 'Date',
        field: 'your_date_field',
        editable: function(params) {
            return params.node.data.your_id_field !== null;
        }
    },
    {
        headerName: 'Justification',
        field: 'your_justification_field',
    },
];

That will allow the your_date_field cell to be edited for rows where your_id_field is not null.

Modify as needed to get it to work in your code.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!