Resizing grid while keeping selected row in view

Hello, I would like to be able to, when a row is selected, resize the grid (make it smaller) and ensure the the row that was selected is still in view. Can anybody tell me how to do these 2 things? Thanks.

Joe Hudson
April 26,

here is the code which adjusts scroll top to make current row visible -

var i = this.getCurrentRow();
var scroll = this.getScrollProperty("top");
var height = this.getRowProperty("height");
var top = (this.getRowPosition(i)-this.getRowOffset()) * height;

if(top < scroll) {

var max = this.getContentHeight(1);
var bottom = top + height;

if (max + scroll < bottom){
        this.setScrollTop(bottom - max);
Alex (ActiveWidgets)
April 26,

This topic is archived.

See also:

Back to support forum