3.2.0

Grid view jumping up because of text wrap error

Hi Alex,
I've come across a bug in my grid.

I set the following properties:
grid.getRowTemplate().setClass("text", "wrap");
.aw-grid-row {overflow-y:visible; }

I did this to ensure that my cell text/contents will wrap and that the row height will automatically adjust based on the biggest cell height which is based on the cell content.

When displaying the grid all looks perfect. But if you scroll down, the grid seems to automatically scroll a bit after a second or so.

I'm using the virtual grid and have modified your example to replicate the error.

Here it is:


<html>
<head>
<title>ActiveWidgets Examples</title>
<style>body {font: 12px Tahoma}</style>

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

<!-- change default styles, set control size and position -->
<style>

#myGrid {width: 600px; height: 300px;}
#myGrid .aw-alternate-even {background: #eee;}
.aw-column-2 {width: 33px;text-align: center; font-size: 12px;font-weight: bold;}
.aw-grid-row {overflow-y:visible; }

</style>
</head>
<body>
<h3>Virtual scrolling</h3>
<p>Virtual scrolling is activated by default. The grid renders only visible rows and repaints the screen after scrolling</p>

<!-- insert control tag -->
<span id="myGrid"></span>

<p>Back to <a href="index.htm">scrolling examples</a>, <a href="../index.htm">all examples</a></p>

<!-- create controls -->
<script>

var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setHeaderText("header");

grid.getRowTemplate().setClass("text", "wrap");

grid.setCellText(function(col, row){return col + "-" + row});
grid.setColumnCount(10);
grid.setRowCount(1000);
grid.refresh();

</script>
</body>
</html>


Please advise.
Thanks very much!
Jaline
March 14,
The current version does not work with expanding rows. The scrolling calculations assume that all rows have the same height.
Alex (ActiveWidgets)
March 15,
Hi Alex.
Do you have any indication of when and if a patch will be available for the above? On our side this is really a big problem. We currently have v1 of the grid and need to upgrade to v2 because of speed issues. That's why I chose the virtual grid, cause it solves our speed issues. But the above is a show stopper for us.
Please let me know, so that I can make an alternative plan.

Thanks very much for all of your help,
Jaline.
March 26,
Virtual scrolling with variable row heights is quite complicated - I cannot promise any firm dates for this. Definitely not the next 2-3 months.
Alex (ActiveWidgets)
March 27,

This topic is archived.

See also:


Back to support forum