:: Forum >>

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
Thursday, August 5, 2010
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)
Friday, August 6, 2010
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
Friday, August 6, 2010
I dont want it to select the row, just go to the spot in the grid
Joe
Friday, August 6, 2010
then use obj.setScrollTop(150*rowHeight);

(replace rowHeight with what you use or 18 default)
Alex (ActiveWidgets)
Friday, August 6, 2010
// 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
Friday, August 6, 2010
I want the selcted item to be at top of grid. not at the bottom
Joe
Friday, August 6, 2010
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
Friday, August 6, 2010
obj.setTimeout(function(){
this.selectRow(current_grid_id_createtable);
obj.setScrollTop(150*18);
},1000);

Saturday, August 7, 2010

This topic is archived.


Back to support forum

Forum search