DataGrid 2 - On-Click/On-Double-Click behaviour - Mendix Forum

DataGrid 2 - On-Click/On-Double-Click behaviour



In the Data Grid widget it is possible to configure that by a double-click on the mouse onto a row item a NewEdit page gets opened and have a single-click ​ to open the field in the row item to open in a direct editing mode.
In the Data Grid 2 widget it is only possible to configure an on-click / single-click action which would then get the NewEdit page opened. This misses the option to open a field as editable in a grid row item.
Could it be made possible to regain the behaviour from the Data Grid widget by having both options for editing data in the grid?

3 answers

As Shakespeare once said; "To click or not to click". However... about double click... there is much to say.


In order to replace the current DG, we have to replace the double click too. I opened a pull request, I hope it will be merged.


To sad that the data grid replacement just needs new workarounds.


You can try following:

For the double click functioniality you can use the doubleclick trigger widget (

With this you can set a double click trigger for individual cells of your row. See Lourens Akkermans solution for that here:


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 this 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:

.custom-table-class {

    .td.align-column-left {
        padding: 0;

        .widget-doubleclick-clickable {
            padding: 15px 14px 15px;
            height: 100%;
            width: 100%;



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.


Then you can try to set the integrated On click functionality of Data grid 2, which works with a single click, to whatever you like.


I did not try it but it should work. Good luck and I hope it helps!