In Ag-Grid, how to make a floating row not editable when column is defined as editable?

耗尽温柔 提交于 2019-12-12 13:45:32

问题


In AG-Grid, How to make a floating row not editable when a column is defined as editable?

Is it possible to use floatingCellRenderer to prevent cell editing for the floating row cell?

floatingCellRenderer: function(params) {
    if (params.node.floating) {
        do_something_here_to_prevent_this_cell_editing;
    }
}

I am using the default cell editors for text/select on the grid.


回答1:


jsfiddle

all you need to do is make a function that checks whether or not a row is floating:

function notFloating (params){
  return !params.node.floating
}

then pass that into the editable attribute of the affected column



来源:https://stackoverflow.com/questions/41645592/in-ag-grid-how-to-make-a-floating-row-not-editable-when-column-is-defined-as-ed

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