async and getRowProperty("count")
I have this bit of code -
And I can't seem to get the row count. It always comes back as zero ("0"). I suspect it may be to do with the async nature of the request method.
What I'm trying to do is set the height of the grid to a percentage of the maximum heigth I've set based on the number of rows.
I.e. if the grid displays 10 rows and I only have 5 to show, set the height of the grid to 50% so that the horizontal scrollbar is just below the data rather than after the rows and some empty space.
<script>
var table1 = new Active.Text.Table
var obj1 = new Active.Controls.Grid
var columns1 =
[
"User", "Spid", "Database", "Start Time", "Host",
"Program", "Command", "Blocked By", "Time Blocked"
]
table1.setURL("$URL1")
table1.request()
obj1.setId("tab1")
obj1.setColumnProperty("texts", columns1)
obj1.setDataModel(table1)
obj1.setStyle("height", "20%")
document.write(obj1)
</script>
And I can't seem to get the row count. It always comes back as zero ("0"). I suspect it may be to do with the async nature of the request method.
What I'm trying to do is set the height of the grid to a percentage of the maximum heigth I've set based on the number of rows.
I.e. if the grid displays 10 rows and I only have 5 to show, set the height of the grid to 50% so that the horizontal scrollbar is just below the data rather than after the rows and some empty space.
Anthony M.
August 1,