How to open a Details page by clicking on the Link Button in Data Grid row.

0
I tried to add a link button in the Data Grid row to open a page. I couldn’t find any solution. Please help me to add link button in Data Grid.
asked
3 answers
0

Which Mendix version are you using?

In data grids before Mendix 9, you cannot add buttons. You can however add a button above the grid that doubles as the default action when someone clicks or double clicks a certain row in the grid. So to solve your problem:

  • Add a button with the function you want (open page) in the bar just above the data grid rows
  • Set that button as the default
  • Have users double-click the row they want to navigate to

 

An alternative would be using a list view and adding a button in there.

 

If you're using the beta data grid in Mendix 9, the above answer is invalid since you can actually use widgets in that one.

answered
0

Datagrid does not support this option by default. As a workaround, you can use template grid. With few tweaks, you can make template grid look like a data grid and it provides features like pagination, action buttons just like a data grid. 
Set the template grid to 1 column and number of rows = page size you want.
Now add a table inside template grid item with desired number of columns/attributes to show in the grid. In any table cell, you can place a button/link widget. When user clicks that button, you can set a microflow that will be called. Object/row will be passed to the microflow. 

For heading of columns like a data grid, use a table above template grid widget. Then you will need some CSS tweaks to make it look like a data grid. 

answered
-1

You can try to use a list-view instead, With some css you can let it look like a datagrid. Then you can add a button with class 'btn-link' 

answered