Datagrid again

Beat Cornaz B.Cornaz at gmx.net
Sun May 31 15:27:12 EDT 2009


While still discovering more on the wonderfull Datagrids, also more  
questions have come up.

I have a table Datagrid which gets filled up with data of different  
lengths, containing numbers. Now I want to make the bottom line 
(meaning the last record) in bold.
It is the Totals all summed up. I started trying to set the first fld  
(first column)in the bottom line to bold


    put the dgNumberOfRecords of grp "Datagrid 3"  into maxNr	
       set the textStyle of fld maxNr of grp "Datagrid 3" to bold

This  works fine if all records are visible in the datagrid. If the  
data is too big, so only a part is displayed, then the field that  
gets bold will be somewhere in the second (or third) column,  
depending on how many records there are and how many fields are  
visible in the Datagrid. I first thought that just the visible fields  
are counted, but my results are pretty inconsistent. I am first  
trying to set the first field on the last line to bold, but sometimes  
3 fields get bold or two. It seems totally unpredictable to me when I  
resize the Datagrid and run the lines above.

So how can I achieve that only the bottom line (record) is bold when  
I completely scroll down?

Another thing I noticed is, that if I leave 1 line blank (so only a  
cr in my data) and then have the line with the Totals, I can't scroll  
all the way down. I am unable to reach the last line. I solved this  
by putting in a 'space' on the empty line and then it works. I was  
wondering why this is necessary.

I don't seem to find the way to change the border color of the  
datagrid. In the group inspector, there is a lot of colors to be  
adjusted, but not the border color.

With the Datagrid in the 'form' fashion, it took me a little while to  
realize that all my new fields etc. which I created in the template  
have to be inside of the Row template GROUP. The manual does say it,  
but it is easily overlooked. Once I had that, it was a piece of cake.

best regards,

Beat


More information about the use-livecode mailing list