DataGrid Display/Edit Issue

I’m trying to get a value ‘–’ to display in a datagrid field but also want only a decimal to be entered when that field is editable. So far I can only get one or the other to work, not both. Details in Loom. Any solution for this please?

I don’t think you could make the input required dynamic. You will have to have both inputs in the cell.

Set the ‘Hourly subsidy’ column type to custom in the datagrid’s settings, then have both a text input and number input inside the cells of the column.

Could then conditionally render the inputs based on the value in ‘Subsidy type’.

You would need to set up the inline editing manually. By default, you will probably want the inputs to be read-only, then on click of the edit button they become editable.

2 Likes

Did you try to use a custom field, drag and drop a text to display the logic you want, and select number as edition field?

Hi @aurelie yes thats exactly what I did. The text field is displayed when the row is not in edit mode, and the input is displayed when it is. And the edit field is only displayed for the type that I want it to be. Works perfectly. Thanks for checking.