1

Topic: How to control column width in a grid

How can I set the width of individual columns in a report grid? I've tried adding a 'width' attribute to the column as:

<column name='sample_id' width='250' visible='false' sql='o.sample_id' datatype='integer' />

but this doesn't appear to have any effect.

Cheers

Alan

Alan Hale
Aberystwyth

2

Re: How to control column width in a grid

Hi Alan
I'd suggest adding a bit of CSS to set the width of the <th> elements in the grid. Each has a unique CSS id so it should be fairly easy to do. In my experience, this provides a hint to the table as to the width, but it will not change a column width if the other cells will not flow reasonably.
Cheers
John

John van Breda
Biodiverse IT

3 (edited by Alan Hale 23-03-2013 21:29:29)

Re: How to control column width in a grid

Hi John

Finally got around to doing this, adding a new css file to the prebuilt_forms/css folder and referencing that in the form settings "other iForm parameters > Additional CSS files to include".

Works perfectly.

Cheers

Alan

Alan Hale
Aberystwyth