PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Peter.Higgins on June 14, 2021, 01:35:21 PM

Title: _PropList$
Post by: Peter.Higgins on June 14, 2021, 01:35:21 PM
Looking for a way to reduce the color application overhead post grid load. 

Have considered Pseudo Multi-Properties and Multi-Property Access and feel the most maintainable way will be to set the basic four properties and assign any number of location colors in one shot rather than build a massive command string and massive value string.

grd'Row.Colno.BackColor.TextColor.$= (repeating string)
grd'_PropValues$= (repeating string)

Wondering if this is currently possible or something that we could look forward to? 
Title: Re: _PropList$
Post by: Mike King on June 14, 2021, 02:33:32 PM
If the colors are consistent for the same column all rows why not just set the 'Row property to zero which indicates ALL rows (or at least do this for the most common color)

Title: Re: _PropList$
Post by: Peter.Higgins on June 14, 2021, 03:12:20 PM

Colors are not consistent. Seems like every grid done in this system uses color coding for order status etc. so there is only a majority theme at the very beginning and end of day.  Coloring makes a 2-3 second delay in this application remotely, there aren't a huge number of grid rows, and the grids frequently refresh every few minutes.

I also tried using Object Id to work around this issue a few years back and did not succeed in the time I allotted.
From past experience I know some control properties do not play well with the Multi-Property Access syntax so long commands do not always work. 

Considering writing a client program to process grid color strings, but have reservations on how that would work considering many remote clients are macs and they use parallels to connect.

Title: Re: _PropList$
Post by: Thomas Bock on June 15, 2021, 01:50:34 AM
Did you try hiding the grid while the colors are set? This can boost the performance.
Title: Re: _PropList$
Post by: Peter.Higgins on June 15, 2021, 10:31:08 AM
Yes the grid is hidden.  I am preloading a memory file and passing that to a grid object that bulk loads the data. 
Just that is huge improvement over the line by line loading previously done.  Normally loading colors is much faster if done after the data with Pseudo Multi-Properties even if line by line, but not in this case as there are a dozen or so statuses that can colorize a line which is ruining the gains from moving to bulk loading. Also this particular panel is mission critical and used at peak network times.

Perhaps there is an undocumented way to include color in the data like on a listbox?   
Title: Re: _PropList$
Post by: Mike King on June 15, 2021, 10:56:11 AM

Make sure you are not reading any data or property back from the grid while loading it.  In order to read a value or property requires a complete packet exchange with the workstation which will slow down the process.
Title: Re: _PropList$
Post by: Peter.Higgins on June 15, 2021, 02:55:47 PM
You bet. The whole point of seeking a bulk load for color formatting was to avoid line/cell handshaking.  The logic is in a tight loop and outbound only for initial load. Data and colors are done separately, but only due to necessity.

Sounds like it is time to write a [wdx] object solution to do repetitive property sets if I have to deal with grid colors.   You will let me know if that is not likely to work, right?