:: Forum >>

vertical scrollbar not showing all rows if row height is increased

I need to adjust my grid's row height to 30px, but the vertical scrollbar is not adjusting and drops rows at the bottom from view. Works fine when I don't specify a height.

#myGrid .aw-grid-row { height:30px; font-size: 11px; border: 1px solid #999; }

I'm using version 2.5.2 and the grid is reading dynamic data every few minutes.

Your help is appreciated. thanks!.
Javier
Wednesday, August 13, 2008
I cannot reproduce this. Can you post an example?
Alex (ActiveWidgets)
Friday, August 15, 2008
Thanks for your response Alex, it appears to be affecting Firefox 3.0.1
Here's a example, my CSV file has 14 lines and only 9 lines are showing.
(displays okay on IE 6.0)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ActiveWidgets Examples</title>

<!-- include links to the script and stylesheet files -->
<script src="/private/itc/WIDGETS/runtime/lib/aw.js"></script>
<link rel="stylesheet" href="/private/itc/WIDGETS/runtime/styles/vista/aw.css"></link>

<!-- change default styles, set control size and position -->
<style type="text/css">

#myGrid { height: 300px; width: 940px }

#myGrid .aw-grid-row { height: 30px; font-size: 11px;
border: 1px solid #999; }

#myGrid .aw-row-selector {text-align: center}


</style>
</head>
<body>
<script type="text/javascript">

// create ActiveWidgets data model - CSV text table
var table = new AW.CSV.Table;

// provide data URL - plain text comma-separated file
table.setURL("testfile.csv");

// start asynchronous data retrieval
table.request();

// create ActiveWidgets Grid javascript object
var obj = new AW.UI.Grid;

// assign unique id for the grid element
obj.setId("myGrid");

var columns = ["Alarm", "Status", "Date / Time", "Priority", "dmz", "Host Name", "Message", "Contract"];

// set column labels
obj.setHeaderText(columns);

// number of columns
obj.setColumnCount(8);

obj.setColumnWidth(50, 0); // ALARM
obj.setColumnWidth(40, 1); // STATUS
obj.setColumnWidth(85, 2); // DATE TIME
obj.setColumnWidth(40, 3); // PRIORITY
obj.setColumnWidth(25, 4); // AREA
obj.setColumnWidth(145, 5); // HOST NAME
obj.setColumnWidth(470, 6); // MESSAGE
obj.setColumnWidth(85, 7); // CONTRACT

// enable row selectors
obj.setSelectorVisible(true);
obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
obj.setSelectorWidth(25);

// set row selection
obj.setSelectionMode("single-row");

// assign external 'data model'
obj.setCellModel(table);

// write grid html to the page
document.write(obj);

</script>
</body>
</html>
Javier
Monday, August 18, 2008
ok, this looks like a bug in the grid control. The row height is lost during the grid re-initialization when the data arrives. To fix it add the following code -

table.response1 = table.response;
    table.response = function(data){

        var height = obj.getRowHeight();
        this.response1(data);
        obj.setRowHeight(height);
    }
Alex (ActiveWidgets)
Tuesday, August 19, 2008
Thanks Alex, that worked!.
Javier
Tuesday, August 19, 2008
This bug is still present in v2.5.3 using Firefox v3.0.4. The fix provided still works, also.
tmtisfree
Tuesday, January 6, 2009

This topic is archived.


Back to support forum

Forum search