Is there a way to set precise width in GridLayout's column

Hi there,

I have multiple gridlayout objects in the same page. All of them are 2 columns’ grid in a verticalLayout. so I want to align them to make it nice looking. I tried to :

grid1.setColumnExpandRatio(0, 1);
grid1.setColumnExpandRatio(1, 2);

grid2.setColumnExpandRatio(0, 1);
grid2.setColumnExpandRatio(1, 2);

The inner cell contents are labels, textfields, date fields and etc. It does not work. I understand the expanding logic. But shouldn’t there be an easy way just to set the column width? Something Like

grid1.setColumnWidth(0, “100px”);
grid2.setColumnWidth(1, “200px”);

Br,
Xuan

Hi,

Just set the expand of that column to zero, and explicitly set one of the components in that column to the width you need.