Double click data grid 2

0
Hi all, Anybody knows if it’s possible to have a double click option in a data grid 2? Or, other option, have one column that when we click checks a checkbox and the other columns when clicked call a microflow? Thank you!
asked
4 answers
1

Make the datagrid2 already have an onclick-event set in its properties. This will trigger upon clicking anywhere in the Datagrid2-element on a object line.

Now to have a separate click action on one specific column:

  • Add a custom-column
  • Insert into that column a container
  • To that container add a microflow to the Onclick-event
answered
2

Lourens Akkerman's solution is a very good start but did not completely solve the problem by itself (thank you btw, you helped me solve the problem!).

If you only use the widget, 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:

.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.

 

 

Hope it helps!

answered
1

Hi André,

 

If you want a double click behaviour like in DataGrid in DataGrid 2 we've done it in this way:

 

- set all columns in Datagrid 2 to “custom content”

- use this widget (https://marketplace.mendix.com/link/component/117887, “Double Click trigger”) for double click action in every column as a shell for your data in that column if you want it for the row or just one column if you want double click action in 1 column

 

Now when a user double clicks a row in the Datagrid 2 you can start an action (call microflow, nanoflow, open page etc.). 

 

Don't forget to not use onclick action in the Datagrid 2 if you use this. 

 

It looks something like this:

 

answered
0

Hello 

Can you please write me how can i set double click widget. I have still problem with some property of 'Children'...thanks

 

 

image.png

answered