i want to enable only some rows in my ag-grid(exemple :2/5) based on a condition .
editable:false can't help because it is applied on the whole list unless if there is a method I do not know
any help please
There is no option in the library to make a single row disabled(both visually and keyboard event based), the only way we could make a single row disabled is by using a customCellRenderer for both header and subsequent cell checkboxes, this allows full control over the checkbox.
If you want the grid to stop editing when focus leaves the cell or the grid, set the grid property stopEditingWhenCellsLoseFocus = true .
To programatically deselect a single row, use rowNode. setSelected(false) . rowNode. setSelected(isSelected, clearSelection) can be used to select rows as well, and will deselect all rows other than the subject rowNode if clearSelection is true .
To enable full row editing, set the grid option editType = 'fullRow' . If using custom cell editors, the cell editors will work in the exact same way with the following additions: focusIn : If your cell editor has a focusIn() method, it will get called when the user tabs into the cell.
You can just bind function
to editable
property in columnDef
, which will be executed on each try of edit
editable: this.checkEditFunction.bind(this)
...
checkEditFunction(params){
//params.node - for row identity
//params.column - for column identity
return !params.node.isRowPinned() // - just as sample
}
.bind(this)
- just for accessibility of external functions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With