A while ago, I had the problem of being able to scroll to a specific row selected and it was suggested that I use the following code:
this.body.scrollTo(null, (this.cellHeight)*selectedRow);
I have the following testcase using the smartclient feature explorer. I'm expecting it to scroll down to my selected row when the data has arrived but it does not.
this.body.scrollTo(null, (this.cellHeight)*selectedRow);
I have the following testcase using the smartclient feature explorer. I'm expecting it to scroll down to my selected row when the data has arrived but it does not.
Code:
isc.ListGrid.create({
ID: "countryList",
width:522, height:224,
alternateRecordStyles:true, cellHeight:10,
dataSource: countryDS,dataArrived: function(startRow, endRow){this.selectRecord(15); this.body.scrollTo(null, (this.cellHeight)*15);},
// display a subset of fields from the datasource
fields:[
{name:"countryName"},
{name:"government"},
{name:"continent"},
{name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false}
],
groupStartOpen:"all",
groupByField: 'continent',
autoFetchData: true
})
Comment