Images in Data Grids

0
Hi there! I’d like to have a data grid that shows in one column the image that is attached to the object. Can you explain how to get there? So long and thanks…    Markus
asked
4 answers
2

Hi Markus, 

Datagrids are meant to show data in a table and no images. You can use a template grid or listview if you want to show images.

Hope this helps!

answered
1

Hi Johan!

Many thanks for the quick reply.
There are some features I like in the data grid that are not available in the template grid:

  • There is one title line (e.g., Diamter, Length, Height, ID) for all rows (without repeatation in each row)
  • It is possible to sort all objects using one column

Can I get the same also in a template grid?

I gave it a quick try and in the template grid the values are aligned vertically for each object.
How can I align them horizontally?

So long and thanks…

   Markus

answered
0

Hi Markus, 

You can use a layout grid (or table) within your template grid (or listview) to align your values vertically.

You can also add a layout grid (or table) above your template grid (or listview) and place your column titles in here, to make sure they are only displayed once.

Sorting can be done by setting the sort order in the listview (or template grid), but only if you choose data source database or XPath (otherwise you can sort in your microflow). To let the user sort the items by clicking on a column is harder, but can be done with the following widget(for listviews): https://appstore.home.mendix.com/link/app/105694/

 

I see there is also a hackish solution to show an image within a datagrid, but I've never done it. See https://forum.mendix.com/link/questions/14242

answered
0

Thanks a lot. I’ll give it a try.

answered