First problems...datagrid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

QuangNgo
Posts: 60
Joined: Thu Mar 31, 2011 8:31 am

Re: First problems...datagrid

Post by QuangNgo » Mon Oct 03, 2011 1:02 pm

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

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: First problems...datagrid

Post by BarrySumpter » Mon Oct 03, 2011 10:48 pm

Start here:
How-Can-I-Colorize-Individual-Lines-in-a-Table-
http://lessons.runrev.com/s/lessons/m/d ... n-a-Table-
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: First problems...datagrid

Post by bangkok » Mon Oct 03, 2011 10:49 pm

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.

QuangNgo
Posts: 60
Joined: Thu Mar 31, 2011 8:31 am

Re: First problems...datagrid

Post by QuangNgo » Tue Oct 04, 2011 5:47 am

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

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: First problems...datagrid

Post by BarrySumpter » Tue Oct 04, 2011 6:51 am

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.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

QuangNgo
Posts: 60
Joined: Thu Mar 31, 2011 8:31 am

Re: First problems...datagrid

Post by QuangNgo » Tue Oct 04, 2011 7:13 am

Hi BarrySumpter,

Thanks a lot. Now flying solo with this one

Regards,
Quang

Post Reply