Page 2 of 2

Re: First problems...datagrid

Posted: Mon Oct 03, 2011 1:02 pm
by QuangNgo
Hi guys,

I would like to use textcolor for text in specific row in datagrid. But there are some problem. Here is my code:

set the dgText of group "dbGrid1" to tTemp
lock screen
set the dgText of group "dbGrid1" to tTemp
put the number of lines of tTemp into tCount
repeat with x = 1 to tCount
put item 9 of line x of tTemp into tOutcome
put item 16 of line x of tTemp into tArchived
if (tOutcome = "Pending") OR (tOutcome = "Awaiting Evidence") then
set the textcolor of item 1 to 11 of line x of group "dbGrid" to blue
end if

I know I may have some error. Could you guys please give me the solutions
Thanks in advance
Regards,
Quang

Re: First problems...datagrid

Posted: Mon Oct 03, 2011 10:48 pm
by BarrySumpter
Start here:
How-Can-I-Colorize-Individual-Lines-in-a-Table-
http://lessons.runrev.com/s/lessons/m/d ... n-a-Table-

Re: First problems...datagrid

Posted: Mon Oct 03, 2011 10:49 pm
by bangkok
QuangNgo wrote: I would like to use textcolor for text in specific row in datagrid. But there are some problem. Here is my code:
See the example there :

http://forums.runrev.com/phpBB2/viewtop ... f=7&t=7865

The colorization must take place within the "default column behavior" of your datagrid.

Re: First problems...datagrid

Posted: Tue Oct 04, 2011 5:47 am
by QuangNgo
Hi bangkok,

Thanks for your reply. In my project I have 5 option to select so I just use only 1 datagrid and automatically generated columns for each option by code.So I thought that I can not use your solution :((

Is there any way to resolve that problems. like the way we "set the textcolor of item 1 to 11 of line x of group "dbGrid" to blue".
I have tried this by Java,C# it's quite easy.But with livecode I'm so stupid.

Thanks again for your help

Regards,
Quang

Re: First problems...datagrid

Posted: Tue Oct 04, 2011 6:51 am
by BarrySumpter
I've asked the same questin and got the same answer.
It's the only way to change the row text color in a datagrid.

It's a shame we haven't figured out a way to change the row text color with a single statement.
That is a rediculously complex way to get the row text color changed.

Re: First problems...datagrid

Posted: Tue Oct 04, 2011 7:13 am
by QuangNgo
Hi BarrySumpter,

Thanks a lot. Now flying solo with this one

Regards,
Quang