Author: dmorozov
Date: 2007-06-14 09:36:44 -0400 (Thu, 14 Jun 2007)
New Revision: 1182
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Fix problem with 0 rows in grid
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-14
12:45:11 UTC (rev 1181)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-14
13:36:44 UTC (rev 1182)
@@ -195,7 +195,8 @@
});
this.rowsCount = Math.min(templNormal.rows.length, this.grid.dataModel.getCount());
- this.defaultRowHeight = Element.getHeight(templNormal.rows[0].cells[0]);
+ var cell = templNormal.rows[0].cells[0];
+ this.defaultRowHeight = cell!=null ? Element.getHeight(cell) : 0;
if(ClientUILib.isGecko) {
this.defaultRowHeight -= this.getBorderWidth("tb") +
this.getPadding("tb");
}
Show replies by date