Setting the textColor of particular rows in a table datagrid?

Terry Judd tsj at unimelb.edu.au
Fri May 13 00:57:25 EDT 2011


HI ­ I want to set the color of various lines in a datagrid (when it¹s
populated) according to a value in one of the columns. I got it to work by
adding a column behavior for each of the displayed columns in the datagrid
and then, in the FillInData handler, querying the value for the relevant
item for the current line of the dgText. This seems kinda clunky and has to
be done for every column in the row I want to color. I must be missing
something as there has to be an easier way.

As an aside, using the method above seems to disable the ability to sort
columns by clicking on their headers. However, adding a simple sort
sortDatagridColumn handler to the datagrid script and passing the
sortDatagridColumn message re-enables it.

Any ideas?

Terry...

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne





More information about the use-livecode mailing list