we have a tablet screen which is a subfile, the number of records in the subfile can vary.
If the height of all the subfile rows are less than the height of the scroller then a large blank area appears after the last record.
If the total height of all rows is more than the height of the scroller, then we don't get to see all of the records.
I would like to dynamically set the scroller height in onLoad as at that point I will know how many rows I want to display, however I get the feeling that it cannot be over-ridden as the height of the scroller doesn't seem to vary, despite my height value being applied and visible in the html in debug.
Below is the code from onLoad where I am trying to set the height
Code: Select all
myRows = parseInt(get("trrn2"),10);
var mygrid = getObj("grdSummary");
var newHeight = (myRows / 9) * 100;
var textHeight = newHeight.toFixed().toString().trim()+"%";
applyProperty("scroller1","height",textHeight);
applyProperty("scroller1","field type","layout");
if (mygrid && myRows !== 0) {
mygrid.grid.setNumberOfRows(myRows);
mygrid.grid.render();
applyProperty("sfl2", "visibility", "visible");
}
Zoe