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

How is set_property implemented?

edited March 2019 in SRP EditTable Control
Hi,

If I have an edit table with a lot of rows, calling, for example, Set_Property(OLECtrlEntID, "OLE.CellColors[field; record]", Array) on each row takes a very long time.

I think it takes a long time because a call to set property on a row does not use random access to access the row, but rather accesses the row by sequentially going through each row starting from the first until it finds the desired row.

Is this true? If so, would it be possible to make it random access? It seems like the edit table is using <> notation to access the desired row.

Comments

  • The internal structure of the SRP EditTable Control is random access. The problem is due to the fact that the control marks itself as needing to be redrawn with each call. Therefore, when making a lot of Set_Property calls, it is recommended to set the "OLE.Redraw" property of the control (do not use "REDRAW") to 0 before setting all your properties and back to 1 when you are done so it does one redraw at the end.
  • edited March 2019
    Ok, I already do that. I think I have too many rows (800+). I will use paging, so that only a fraction of the 800+ rows are ever displayed at any one time.


    Thanks
  • Assuming you know all of the property settings and values at once, have you tried minimizing the number of Set_Property calls by using the @RM concatenation method?
  • No i have not, but I was hoping that something like that existed. So you're saying it's possible to use one set property call to alter multiple rows at the same time? That would be perfect.
  • edited March 2019
    Sort of. The Set_Property function supports the ability to send an @RM delimited list of controls, properties, and values. This will reduce the overhead, but it is unknown whether this will benefit the calls into the SRP EditTable control given that this introduces another layer.
  • I will try it.

    Thanks
  • it's actually slower.

    Anyway, paging is the best option.
Sign In or Register to comment.