I need some DataGrid performance help

Paul Dupuis paul at researchware.com
Wed May 6 08:41:50 EDT 2020


On 5/6/2020 7:58 AM, zryip theSlug via use-livecode wrote:
> After each call to a column property such as dgColumnWidth, the datagrid is
> resized (header, column, rectangles, etc)

This I did not know. Thank you.
>
> Instead of having them in the loop, prepare the column size, columns label,
> etc and uses the table properties existing for setting all the values at
> once. In this case the refresh of the datagrid is internally made only one
> time.

This I did know. As I said in my initial message:

I realize that I could use: 'set the dgProp["column widths"] of grp <DG> 
to <returnDelimitedListOfWidths>' as a single set action vs a loop where 
I am using 'set the dgColumnWidth[tColumnName] of grp <DG> to 
<singleWidth>'.

However, there are only Datagid properties so set attributes for ALL 
columns for alignments, visibility, widths, and labels. Therefore, I 
have to use a loop anyway to set the tooltip, sorttype, sortdirection, 
end editability


SO, while I can change the code to set the column ALIGNMENTS and WIDTHS 
all at once, I am still stuck setting the TOOLTIP, SORTTYPE, 
SORTDIRECTION, and EDITABILITY column by column in a repeat loop. So 
what do I do about setting the TOOLTIPs? There is NO 'set the 
dgProp["column tooltips"] of grp <DG> to <returnDelimitedListOfTips>'

Obviously, I can just TRY using LOCK MESSAGES (as Paul Hibbert 
suggested), but I am concerned that may cause more problems that it 
solves. Does anyone KNOW for sure?




More information about the use-livecode mailing list