@Joyce in OH had told me to ask @aurelie if you might know if this is a bug or not (please excuse my tagging right away - PS your videos are awesome). @Mael is also helping me here on a support ticket. Thank you so much in advance for help here! Hopefully this isn’t a waste of everyone’s time if Datagrid is being reengineered as this is suggesting (💬 WeWeb team needs your feedback: Data Grid/Table - #19 by Luke).
Template datagrid selected row var not actually updating if reselected - Issue may have already been resolved by Mael.
My customized datagrid var is updating if reselected but no way to give feedback to user to reselect after updating row. Mael said that “For the selected row, it’s normal, when you click on the checkbox it’s adding the current row in a variable. If you change it after you need to do the logic yourself to update both…For the selected row, you need to do the logic yourself in the row update workflow. You can check if the row is selected, and if yes modify the element selected row also”
This makes sense, but not sure how to do this. I have set up logic for Update Workflow to be a true/false split. My logic to find if row is “Selected” is as follows
Now if false (index is found so doesn’t return “-1”) and I want to now update the “Data Grid - Selected Rows” var, that is not a variable that exists for me to use in the action “Change Variable Value”. Not sure what to do from here? Hope that made sense.
After customizing my datagrid (i.e., changing index to “id” instead of “email”), the “Please fill out this field” popup doesn’t appear for columns anymore when saving with column empty. This is on default datagrid columns if try and save with nothing in the column. My table doesn’t do that anymore even though columns are declared as “required”.
After taking more time to test on my side, the variable Datagrid - selectedRows is not modifiable
What you can do is disabling the parameter “allow selection”, create a new column with a checkbox. And on change of the checkbox have a workflow that is adding data to a variable that you have created
Wondering how I would copy the “checked” state to another element? Trying to recreate the datagrid checkbox column. Also, is it possible to have the checkbox in the header row to select all? It is not allowing me to drag down element to the headers section. Please let me know, thanks!
However, I need to have that checkbox update based off clicking that rows checkbox. I am trying to do that below, but the onclick action does not return any way for me to find the index in the datagrid and update. Please advise, thank you so much!
Wondering how I would copy the “checked” state to another element?
It’s not possible to copy the “checked” state, it’s a special state for the checkbox element. But you could have a state for your full row, in the condition you can verify that the id of the row is in your variable selected row
Also, is it possible to have the checkbox in the header row to select all?
With our current datagrid, it’s not possible to do that. The text is automatically added when you add a new column
However, I need to have that checkbox update based off clicking that rows checkbox. I am trying to do that below, but the onclick action does not return any way for me to find the index in the datagrid and update. Please advise, thank you so much!
You can find all the information you need in the first tab. I would advise you to change the trigger and set “On change”