[Data Grid Reactive] enable or disable certain
Forge component by Bruno Martinho
Application Type
Reactive

Is it possible to dynamically, enable or disable certain cells on a grid? Turning the edit mode just for certain cells in a row?

Solution

Hello @Pedro Vicente ,

Currently there is not a possibility to set AllowEdit just for a cell.

The suggestion is to use the Column's OnAfterEdit event, using some JS you can get the row data and depending on that you might not accept the new value.

It's not what you requested, but it might give you the functionality you need.

Check the OML in attachment, publish and open Home screen.

Please let me know if this helps.

Bruno Martinho


DataGridReactiveEdit.oml

What you ask for is not exactly an easy task, and it will require a little work.

You can use the extend propertys, and use the style visible to hide and show the cells in question.

Without more details I can't help but basically it will be something like this: if a certain field is empty, it is to hide these cells, both the header and the expression cell.

This example. In the grid i have to type of data. 

Sources and calls, they have specific fields for each type, and on each line I wanted to activate the cells for each type and disable those that are not 

Solution

Hello @Pedro Vicente ,

Currently there is not a possibility to set AllowEdit just for a cell.

The suggestion is to use the Column's OnAfterEdit event, using some JS you can get the row data and depending on that you might not accept the new value.

It's not what you requested, but it might give you the functionality you need.

Check the OML in attachment, publish and open Home screen.

Please let me know if this helps.

Bruno Martinho


DataGridReactiveEdit.oml

Not quite what I wanted but it serves the purpose. Thank you

Hello @Pedro Vicente,

I'm not sure I understand what you asked for. But if I understood you correctly, you want to turn off editing for specific grid columns. This way, you will only have available for editing the cells that you did not check AllowEdit = False in the input parameters of the column to which the cell belongs to.

Check the image below:


Please let us know if it works for you.

Best regards,

Tiago Pereira

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.