Datagrid column/cell coloring

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Datagrid column/cell coloring

Jim Schaubeck-3
Regarding the DataGrid, can someone point me in the right direction for
setting a cell's text color (in a certain column) based on the value of the
data in each cell of that column.  I don't want to evaluate the entire grid,
just cells in a particular column.  I see how to set the color of an entire
row and also each cell in the entire grid...I need to be more specific with
the coloring.

 

IE: A particular columns' name is "Closing Percent".  Any cell in that
column with a number <25 I would like to set the textColor red (vs black)

 

Thanks for any help folks

 

____________________________

jim schaubeck

714.321.4499

 

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Datagrid column/cell coloring

JosepM
Hi,

Check this lesson, you can found how to color cells and control the data.

4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to-a-Cell-


Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

RE: Datagrid column/cell coloring

Jim Schaubeck-3
I saw that lesson but I do not want to apply the colorization decision in my
code to every cell in the datagrid.  How do I decipher what column and/or
what row pData is from?

____________________________
jim schaubeck
714.321.4499


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of JosepM
Sent: Friday, June 18, 2010 4:04 PM
To: [hidden email]
Subject: Re: Datagrid column/cell coloring


Hi,

Check this lesson, you can found how to color cells and control the data.

http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagr
id/lessons/4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to
-a-Cell-
4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to-a-Cell-


Salut,
Josep
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Datagrid-column-cell-coloring
-tp2260342p2260834.html
Sent from the Revolution - User mailing list archive at Nabble.com.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Datagrid column/cell coloring

Jim Schaubeck-3
I have this script in the "My Default Column Behavior" btn script


on FillInData pData
   -- This message is sent when the Data Grid needs to populate
   -- this template with the column data. pData is the value to be
displayed.
   set the text of the long id of me to pData ## temp workaround for
  CheckForPercent  <-------------------Added a command to Trevor's original
script
end FillInData


private command CheckForPercent  <--------------------- This is the command
script
   if the dgColumn of me is "Col 2" and the text of me <20 then
      answer "trigger"-- For testing  <--------------------  I get this
response on one of my cell containing "9"
      set the foregroundColor of me to "red"  <--------------------  BUT the
text does not get set to "red"
   else
      set the foregroundColor of me to "black"
   end if
end CheckForPercent


I get the answer box saying "trigger" but the text in the field does not get
set to red

Anyone know why???

____________________________
jim schaubeck
714.321.4499


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jim Schaubeck
Sent: Wednesday, June 23, 2010 11:16 AM
To: 'How to use Revolution'
Subject: RE: Datagrid column/cell coloring

I saw that lesson but I do not want to apply the colorization decision in my
code to every cell in the datagrid.  How do I decipher what column and/or
what row pData is from?

____________________________
jim schaubeck
714.321.4499


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of JosepM
Sent: Friday, June 18, 2010 4:04 PM
To: [hidden email]
Subject: Re: Datagrid column/cell coloring


Hi,

Check this lesson, you can found how to color cells and control the data.

http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagr
id/lessons/4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to
-a-Cell-
4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to-a-Cell-


Salut,
Josep
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Datagrid-column-cell-coloring
-tp2260342p2260834.html
Sent from the Revolution - User mailing list archive at Nabble.com.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Datagrid column/cell coloring

Jim Schaubeck-3
I found out what is causing the color to not stay red.  The "setprop
dgHilite pBoolean"

Still working through the learning process :-)

____________________________
jim schaubeck
714.321.4499


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jim Schaubeck
Sent: Wednesday, June 23, 2010 12:04 PM
To: 'How to use Revolution'
Subject: RE: Datagrid column/cell coloring

I have this script in the "My Default Column Behavior" btn script


on FillInData pData
   -- This message is sent when the Data Grid needs to populate
   -- this template with the column data. pData is the value to be
displayed.
   set the text of the long id of me to pData ## temp workaround for
  CheckForPercent  <-------------------Added a command to Trevor's original
script
end FillInData


private command CheckForPercent  <--------------------- This is the command
script
   if the dgColumn of me is "Col 2" and the text of me <20 then
      answer "trigger"-- For testing  <--------------------  I get this
response on one of my cell containing "9"
      set the foregroundColor of me to "red"  <--------------------  BUT the
text does not get set to "red"
   else
      set the foregroundColor of me to "black"
   end if
end CheckForPercent


I get the answer box saying "trigger" but the text in the field does not get
set to red

Anyone know why???

____________________________
jim schaubeck
714.321.4499


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jim Schaubeck
Sent: Wednesday, June 23, 2010 11:16 AM
To: 'How to use Revolution'
Subject: RE: Datagrid column/cell coloring

I saw that lesson but I do not want to apply the colorization decision in my
code to every cell in the datagrid.  How do I decipher what column and/or
what row pData is from?

____________________________
jim schaubeck
714.321.4499


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of JosepM
Sent: Friday, June 18, 2010 4:04 PM
To: [hidden email]
Subject: Re: Datagrid column/cell coloring


Hi,

Check this lesson, you can found how to color cells and control the data.

http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagr
id/lessons/4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to
-a-Cell-
4202-How-Do-I-Override-the-Default-Behavior-For-Rendering-Data-to-a-Cell-


Salut,
Josep
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Datagrid-column-cell-coloring
-tp2260342p2260834.html
Sent from the Revolution - User mailing list archive at Nabble.com.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Datagrid column/cell coloring

JosepM
In reply to this post by Jim Schaubeck-3
Hi Jim,

Maybe you can customize the behavior for the columns that need to colorize. In the columns options at bottom you have one button to add a custom behavior for the selected col. Change the FillData for the column.

Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

RE: Datagrid column/cell coloring

Jim Schaubeck-3
Thank you Josep.  I took your advice and went through the lesson but added
some experiments and I figured out how to check for a condition, change the
textColor and also interrupt the pBoolean handler which was changing the
color back to black.  That's the part I was missing.

Thanks for your comments, they helped me!

____________________________
jim schaubeck
714.321.4499

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of JosepM
Sent: Wednesday, June 23, 2010 5:49 PM
To: [hidden email]
Subject: RE: Datagrid column/cell coloring


Hi Jim,

Maybe you can customize the behavior for the columns that need to colorize.
In the columns options at bottom you have one button to add a custom
behavior for the selected col. Change the FillData for the column.

Salut,
Josep
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Datagrid-column-cell-coloring
-tp2260342p2266364.html
Sent from the Revolution - User mailing list archive at Nabble.com.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution