You need to create a button with the realted action and mark the button then as “default button”. Then the action of the button will be used on double-clicking a line in the grid.
For anybody who searches for a solution when using Data grid 2 you can use the doubleclick trigger widget (https://marketplace.mendix.com/link/component/117887). If you only use the widget by itself, the double-click action will only be applied to the text itself. So it does not work with clicking on the row, you will have to click right on the text.
I have solved it by adding custom CSS to make the doubleclick-widget fill out the whole cell. For this you have to set the padding of the parent element of doubleclick widget to 0. Then you have to set the desired padding on the doubleclick widget and make it fill out the whole cell.
In my case it looked like this:
padding: 15px 14px 15px;
Since it gets rid of the padding of all the cells, you have to manually adjust the padding for other cells again, which do no have the doubleclick widget.
Hope it helps!
just set “is default button” to yes, if you want to set that particular button as “double click” action.