Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Is CELLPOS random access

edited April 8 in OpenInsight
If I use Get_Property (myedittable, "CELLPOS", position) to get the text in a cell, does OI iterate through all preceding rows to get to the desired row, or does it go straight to the desired row?

I am trying to implement lazy loading for an OI edit table. When the user scroll to a particular point, I load a chunk of data, rather than loading it all at the beginning.

I would like to be able to access the text of the topmost row on every VSCROLL, to check if it has already been loaded. But if CELLPOS is not random access, this will be too slow (I suspect).

Alternatively, I could use a global variable to keep track of which chunks I have already loaded -but I don't want do it like this because I hate setting and getting non-standard properties.


  • I'm not 100% certain, but I am inclined to believe OI does not iterate through all preceding rows. I based this on the fact that CELLPOS is a combination of ACCESSPOS and ACCESSDATA, and I'm pretty sure those are random access. You could also use the TEXT_BY_POS method, which is supposed to be very quick.
  • edited April 14
    This does work when using the scroll wheel to scroll , but when dragging the scroll gripper, OI fires VSCROLL events before the final drag destination is reached, which means that each chunk along the path to the final destination is loaded, rather than just the final chunk -- which makes the scroll very slow.

    I will have to use another method unfortunately, unless there is a way to make the scroll gripper not fire VSCROLL events while being dragged.
Sign In or Register to comment.