3.2.0

Upon creation of grid, go to certin row.

If i have a number like 150, how do i go to this row during the creation of a grid, so the user does not have to scroll down to this item?
Joe
August 5,
You should call selectRow(150) after some timeout (to make sure the grid is already rendered, otherwise the grid will not scroll).

var obj = new AW.UI.Grid;
obj.setCellData(function(col, row){return col + "." + row});
obj.setHeaderText("header");

obj.setColumnCount(10);
obj.setRowCount(1000);

obj.setSelectionMode('single-row');

document.write(obj);

// select row 150 and scroll into view
obj.setTimeout(function(){
    this.selectRow(150);
}, 1000);

Alex (ActiveWidgets)
August 6,
If the user selected 150 on the previous grid, hit refresh, how can i make it go to the sleected row they picked on the previous grid?

Seems when they refresh grid, it looses foucs, and dosent know what they selected..
Joe
August 6,
I dont want it to select the row, just go to the spot in the grid
Joe
August 6,
then use obj.setScrollTop(150*rowHeight);

(replace rowHeight with what you use or 18 default)
Alex (ActiveWidgets)
August 6,
// select row 150 and scroll into view
obj.setTimeout(function(){
this.selectRow(150);
}, 1000);


How do you make it to the top of the grid?
and not at the bottom of the grid?
Joe
August 6,
I want the selcted item to be at top of grid. not at the bottom
Joe
August 6,
obj.setTimeout(function(){this.selectRow(current_grid_id_createtable);},1000);
obj.setScrollTop(150*18);

i have all the default items for the grid.

THis dosent put it at the top
Joe
August 6,
obj.setTimeout(function(){
this.selectRow(current_grid_id_createtable);
obj.setScrollTop(150*18);
},1000);

August 7,

This topic is archived.

See also:


Back to support forum