data grid code (color)
sadhu at sddev.castandcrew.com
Wed Apr 15 13:09:51 EDT 2009
3rd try -
Your help is requested once more .. I'm stuck. I've been trying to
find a way to apply color to a single cell (or even to one line) of
a data grid, with your example and every other combination or syntax
variation or other thing I can think of, no luck so far.
Can you suggest a line(s) of code to replace the one setting the background
color below? (the rest of the code works).
Again, I am in your debt.
repeat with whichLine = 1 to the dgNumberOfLines of group "data grid 1" of card "data grid card"
put the dgIndexOfLine[whichLine] of group "data grid 1" of card "data grid card" into whichIndex
if (foundSSN) then
put employeeSSN into theCellContent
put "SSN not found" into theCellContent
## set the backgroundColor of graphic 1 of me to "red" - generates an error
dispatch "SetDataOfIndex" to group "data grid 1" of card "data grid card" \
with whichIndex, "col 9", theCellContent
More information about the use-livecode