Scroll to grid line in HTML

Travis Wendland

Member
I found the following post in the Enterprise One Tips and Tricks forum and I was wondering if anyone has successfully used this technique on an HTML client.

I used this technique on Citrix to select the first row in the grid after loading the grid manually. However, when I run the program on HTML, it doesn't work. It does not move the grid row focus and it deletes the first row in the grid.

Has anyone used this technique successfully on HTML or have another suggestion?

Thanks,
Travis

This Tip was suggested by John Oliver:

Q: "Does anybody know how to scroll a grid to a given row and select the row? I know how to use the GetgridRow system function to find the row number I want, but I cannot find any way of bringing that row to the user's attention. I don't want to hide the other rows; I just want to scroll the row into view if it is not visible, and I want to select it."

A: "Insert a new row at the location you wish to scroll to. Then delete it. The row you wanted is now selected. It is a ghastly hack, but it works transparently."


Sef van den Nieuwelaar
Australia
B732 on NT, XE on NT, B732/A73 on AS400, B733 on NT
 
Travis, what SP are you running on your JAS server? I've found anything pre SP21 to exhibit many wierd behaviours.

Even given SP21 or SP22 I'd still not be entirely surprised that the trick didn't work. The runtime probably considers that inserting a row then deleting it causes no net change and as an optimization does no refresh.

Perhaps if you somehow force an HTML post between the insert and the delete it could work.
 
Hi Travis,

I haven't worked on HTML up to know but I have a hint.

Maybe when you insert a row on a HTML grid then it will be inserted after the designated row and not before it, so its row number will be +1 higher.

a.) Disable the delete and check what is the situation.
b.) Delete the row # N+1 instead of N (this is 2 in your case) - maybe this will place the focus onto the 2nd line,
In this case:
c.) Designate row # N-1 for insert (0) and delete row #N (1)

Please, share your results with us. Thanks!

Zoltán
P.S.: I used similar technique to force the execution of Row Exited events immediately after ar inserted a row into the (in the case of programatically filled grid, it is necessary only for the last inserted row)
 
Back
Top