>>>Yes, yes it will work this way. Visually add and extra column, by default it will be at the end all the columns. Now shift this latest (last) column to be the first column visually, setting the no. as 1 in the properties sheet. the it will stop working
>>
>>You mean you added a column and set its columnorder to 1? Borislav's code should still work.
>
>Unfortunately it won't :-(
>It set the focus to Column1 not to ColumnXX which is the last added column.
I had (in my mind, at least) a fix for these cases, where columnorder isn't equal to column index, but I'm quite busy at the moment, and I've done some changes to the app where I was testing the TotalGrid, so it won't work now.
The idea is to, well, in grid's init
this.addproperty("aCTab[1]",0)
dime this.aCTab[this.columncount]
for i=1 to this.columncount
this.acTab[this.columns[i].columnorder]=i
endfor
Then we'd have an array addressable by the column order, which would return the index of the column. So the scroll loop would scroll until column[this.aCTab[1]] becomes the .leftcolumn. Not sure that'd work, though, but worth a try.
Um, assuming the columnorder numbers actually go from 1 to .columncount - I know they should, but did anyone really check that? :)