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
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,