Checkbox in inline editing data grid

Hi everyone,

This might be something easy but I’ve already spent a lot of hours with it and I’m unable to solve it - so apologies in advance if it is stupid :slight_smile:

I’m using a data grid to edit data from a table, and everything is working fine except for a checkbox.

I have added an item with the type “Checkbox” and it’s linked with a field in my database of boolean type (what here appears as “Active status”, it’s boolean)

image

However in my grid there’s always a tick button, no matter the value coming from my db.

image

Moreover, there is no “box” as such, and when I click on “Edit”, it doesn’t allow me to check or uncheck anything. It’s like if there was only an icon, and not an actual checkbox.

I’m using this same post to ask something else about inline editing. In this tutorial (https://www.youtube.com/watch?v=E0yUb06PDYo), when you click on the row to update the data, weweb automatically styles the row differently, making it look like something editable. Right now in my app nothing happens - the style remains the same, but you can modify the text. I’d really appreciate it if someone can let me know how I can make that happen - if it’s native or if I’d need to play around with variables to change the styling.

Thank you very much in advance!

Regarding the second point, I see that the behavior is different if you use the “Datagrid” element from the “Elements” section, than if you use the “Table” element under the “Data display” section - although initially they look similar. However, the behavior of the checkbox remains the same - attaching an example.

Maybe this is the intended behavior and I’m missing someting, but I would expect it to behave as the first column selector, which as you can see is not the case :slight_smile:

Just to close the thread in case it’s useful for someone, I have finally decided to use a custom field to include the checkbox.

Regarding the look&feel of the editable fields, I have created a variable “readonly” that I have included in the object of data and that changes when you click the edit pencil. I have created a state on each element linked to that variable, so whenever you click the pencil, it will set the variable to true and activate this new look.

Cheers! :smiley:

1 Like