3.2.0

Horizontal Virtual Mode

Hi All,

I have a grid that is loaded with resultsets from queries run against a specified database. The performance is pretty reasonable but I have a question:

I notice that virtual mode is on when scrolling into the grid and then back up to the top again (top-to-bottom-to-top). I can see virtual mode is working by it's slightly delayed reprint - which is fine with me as we only load up to 500 rows at a time.

However, when I scroll from side to side in a resultset that has more than 20 or 30 columns, I don't see the virtual painting that I see when scrolling up and down.

Is there something I need to do to get the side-to-side virtual scrolling working or is it only up and down?

By the way, I am using the grid in with a GWT app so the code below has some funny stuff in it.

I am using 2.5.1. Here is a code sample:

var widget = this;
try{
$wnd.mygrid = new $wnd.AW.UI.Grid;
$wnd.mygrid.setSize(winWidth, intTopRS);
$wnd.mygrid.setSelectorWidth(60);
$wnd.mygrid.setHeaderHeight(20);
$wnd.mygrid.setRowCount(rowCount);
$wnd.mygrid.setHeaderText(myColumns);

// set number of rows/columns
$wnd.mygrid.setColumnCount(myColumns.length);
// enable row selectors
$wnd.mygrid.setSelectorVisible(true);
$wnd.mygrid.setSelectorText(function(i){return this.getRowPosition(i)+startRow});
// set row selection
$wnd.mygrid.setSelectionMode("single-row");
$wnd.mygrid.setCellText(grid);

$wnd.mygrid.onCellClicked = function(event, col, row){

widget.@com.phs.dbe.client.DBESQLManager::setSelectedRow(Ljava/lang/String;) (row);
widget.@com.phs.dbe.client.DBESQLManager::setSelectedCol(Ljava/lang/String;) (col);
widget.@com.phs.dbe.client.DBESQLManager::onCellSelected(Ljava/lang/String;)(this.getCellText(col, row));

};

$wnd.mygrid.onSelectorClicked = function(event, index){
var columns = $wnd.mygrid.getColumnCount();
widget.@com.phs.dbe.client.DBESQLManager::buildRowScreen(Ljava/lang/String;)("init");
for (var c=0;c<columns;c++){
var val = $wnd.mygrid.getCellText(c, index);
widget.@com.phs.dbe.client.DBESQLManager::onRowSelect(Ljava/lang/String;)(index);
widget.@com.phs.dbe.client.DBESQLManager::setRowCols(Ljava/lang/String;)(val);
}
widget.@com.phs.dbe.client.DBESQLManager::buildRowScreen(Ljava/lang/String;)("load");
};

$doc.getElementById(div).innerHTML = $wnd.mygrid;
return $wnd.mygrid;
}
catch(e){
$wnd.alert(e.description);
}
return null;
Pinch Hitter
June 24,
In 2.5.1 the virtualMode property applies both to the vertical and horizontal direction. Probably you just don't see grid repaint if you move right/left by one column (because it is already created but not visible). Try home/end to jump to the first/last cell in a row and you should see column repaint.
Alex (ActiveWidgets)
June 24,

This topic is archived.

See also:


Back to support forum