You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As far as I can tell after combing through the docs, the ability to conditionally set the cell editor based on row data is not supported. Since editable grids with dropdowns are not supported in BUI standard grid, I started rewriting one of our grids to this new AG Grid, only to find out that we are unable to set up cell editors conditionally. AG grid supports writing a callback to conditionally set the editor based on row data.
Describe the solution you'd like
Perhaps a function on GxColumn: addConditionalEditor(GxColumn columnToChangeEditor, String fieldNameInRowToCheck, String matchValue, GxCellEditorInterface cellEditorToSetIfMatch)
This can add an if statement to the cellEditorSelector callback on the AG Grid column as stated in their docs. There is probably a better solution than this but this one seems straight forward.
Describe alternatives you've considered
I have considered extending the existing classes like GxColumn to unlock this functionality, but there seems to be no happy path to get there without extending a large chunk of the entire plugin. I also tried my hand at changing the cell editor right as the user starts editing the cell, but this results in the different editors flashing on/off screen, and can lead to inconsistent data.
Is your feature request related to a problem? Please describe.
As far as I can tell after combing through the docs, the ability to conditionally set the cell editor based on row data is not supported. Since editable grids with dropdowns are not supported in BUI standard grid, I started rewriting one of our grids to this new AG Grid, only to find out that we are unable to set up cell editors conditionally. AG grid supports writing a callback to conditionally set the editor based on row data.
Describe the solution you'd like
Perhaps a function on GxColumn:
addConditionalEditor(GxColumn columnToChangeEditor, String fieldNameInRowToCheck, String matchValue, GxCellEditorInterface cellEditorToSetIfMatch)
This can add an if statement to the cellEditorSelector callback on the AG Grid column as stated in their docs. There is probably a better solution than this but this one seems straight forward.
Describe alternatives you've considered
I have considered extending the existing classes like GxColumn to unlock this functionality, but there seems to be no happy path to get there without extending a large chunk of the entire plugin. I also tried my hand at changing the cell editor right as the user starts editing the cell, but this results in the different editors flashing on/off screen, and can lead to inconsistent data.
Additional context
https://www.ag-grid.com/javascript-data-grid/cell-editors/#many-editors-one-column
The text was updated successfully, but these errors were encountered: