Hi, I am trying to figure out workflows associated with the checkbox element in datagrid. There are to states “selected” and “unselected”. I could not find any trigger for either of two unlike the edit buttons (update or delete row).
Anyone has any ideas how to trigger any workflow based on the state of the checkbox?
@stagiaire that was the first thing I tried. But I am having a hard time figuring out when someone “unchecks” the checkbox. In either situation differentiating between two types of clicks is where I got stuck. So I was hoping that given it is in a datagrid element with a specific function of “select row” that there will be states like “checked” and “unchecked”, but I was not able to find it. Otherwise how do we do anything when a row is selected?
My bad I did not take into account the datagrid factor.
I don’t know if this is possible using classic weweb tool as I can’t find a way to refer to checkboxes individualy. You could find a workaround but I will need more information about your situation. Feel free to send a private message if you can’t find a solution, but remember I am not a weweb staff, they might have a better solution for you
@stagiaire For benefit of others, Mael from support helped me with this issue.
The property checked or unchecked is not bound to the checkbox but to the grid itself. So on your left hand side menu you will see an array of selected objects in the navigation panel under “variables” " from components tab. See attached picture. In case a noob like me is looking for it, this is the variable to use.
Hey @hsatl
Few things have changed, and i found myself looking to count checkboxes checked in a collection list…
Do you mind sharing how to do that pls?
Hi @hicham ,
by using the same component variable (DataGrid - selectedRows) of your datagrid you have access to an array. You can use the length function to have the count.
Here is an example of a text bind to the number of selected items.