Add action button event in Datagrid2

Hello everyone,   I’m looking for a method that can add event button as control bar in Datagrid2.   For example: I have a list of object that is display in Datagrid2, for each record I add a checkbox. I want to add a button “Delete” that will delete all checked record.     When I use Datagrid, it has a control bar that allowed me to add button action for microflow. However, I cannot find that settings in Datagrid2   I had tried searching information on the Mendix document about Datagrid2 but there is no information about it. Does anyone have experience about this issue?   Updated: Added a microflow for deleting selected objects.   However, I cannot pass the list object in Datagrid2 as a parameter to the microflow.
2 answers

Hi Pham Minh Chau,


You could have the checkbox being a Boolean attribute in your datagrid entity. When you check the checkboxes, the value of the checkbox boolean becomes true. When you eventually press the delete button, you call a microflow that deletes all the entities with checkbox true.


  1. Create a boolean attribute in the entity and set it as attribute for the checkbox
  2. Creat for the OnClick event of the delete button a Microflow
  3. In the Microflow retrieve a list with object that have the checkbox attribute on true.
  4. Run a Delete activity for that list, so the objects will be deleted.
  5. (make sure you enable ‘refresh in client’ to directly see the delete results.)

Hope this will help you toward you goal. Good luck,




Attention, searchers, with the latest data widget update , mendix released this feature. Header level actions.