Datagrid 2 not setting column width based on header width

0
Hello!  Can someone help me out here? I have a datagrid 2 with several columns. Those columns are not showing all the content on the header and defining their width based on the content I have bellow in the body of the datagrid. I have the column width set to "auto-fit content" and the min width to "set by content". What can I do? 
asked
3 answers
0

Hi Helga,

 

Try to make minimum columns mainly unique one available in datagrid 2 remaining fields kept is hide by default if needed people can make it visible, also while double click show all data as view pop up in detail. If you still wants to show all columns in same datagrid means add horizontal scroll using SCSS which is not much user friendly.

 

Hope it helps!

Thanks & Regards,

Manikandan K

answered
0

Hi Helga,

you have to write your own custom css for horizontal scrolling and better viewing the content available on the datagrid2.

 

You can refer this

https://community.mendix.com/link/space/app-development/questions/1329

answered
0

Hi Helga,

Another thing you can try that may help is to have your Datagrid 2 headers wrap.  You can do that by adding this class to the _custom-styles.scss file in the styling section of your app:

.header-wrap.table .th .column-header span {   

      text-wrap: wrap;
}

Then add class header-wrap on the appearance tab of your Datagrid2

image.png

 

Might make it easier to see the header text.

 

Mike

answered