Prevent DataGrid2 from clicking through on custom content

2
My question is basically exactly as the title suggests. I have a datagrid2 that has a show page microflow configured on click. In the datagrid I also have a column that has custom content with a switch widget on it. I want to be able to click the switch without triggering the row Onclick event and showing the page. Is there a way to do this? I’ve searched around but have yet to find anything related to this.
asked
3 answers
1

This really should be standard.

 

Custom content should have the ability to stop propogation to the on click row action if needed. Quite dissapointed no solution is available.

answered
0

Hey there, in general the easiest and nicest way to get your concept working is to do the following:

 

  1. Add a custom content collumn at the end of the grid
  2. Add a link button with only an icon to perform the show page microflow
  3. Remove the on click action of the whole datagrid

This will ensure that you have both functions without the problems and if you later on want to add more functions to your rows, you can extend the last collumn with more buttons :)

answered
0

We've made the onclick on a row in Datagrid 2 a double click action to prevent this.

 

So when a user double clicks a row a microflow/nanoflow/page is triggered. In the last column we put the buttons/links to other actions which are single click actions. 

 

If this is still relevant, you can find a short explanation here: https://forum.mendix.com/link/questions/118052

answered