Expand my Community achievements bar.

Variable Column Widths

Avatar

Level 1

I have a form containing a table (TableDetailAdmGrMetSubsidieOV) with a header row and a variable number of rows.

The rows can contain 1 to 4 columns. The first column, TxtStudierichting, is always filled in, but in case TxtOnderwijsvorm is empty. That column and  the columns TxtLeerjaar1 + TxtLeerjaar2 shouldn't be displayed, but TxtStudierichting should fill the complete table width then. How can I arrange this?

Here's a screenshot of my designer. Maybe it makes things more clear:

AdobeLCColumns.jpg

3 Replies

Avatar

Level 1

Meanwhile I solved the problem myself with the following code:

if (this.Row1.TxtOnderwijsvorm.isNull == 1) {

var newColumnWidths = "160mm 0mm 0mm 0mm";

this.Row1.TxtOnderwijsvorm.presence = "hidden";

this.Row1.TxtLeerjaar1.presence = "hidden";

this.Row1.TxtLeerjaar2.presence = "hidden";

} else {

var newColumnWidths = "100mm 20mm 20mm 20mm";

}

TableDetailAdmGrZonderSubsidie.columnWidths = newColumnWidths;

Avatar

Level 10

Hi,

I don't think it likes 0/zero. Try "20mm 0.0001mm 0.0001mm 0.0001mm".

Niall

Avatar

Level 1

You're right. That works even better. Thanks alot!