Topic: Question - date and color

I have one questions,

1) i have a product that i define a revision date, after i save it i can view it in a table grid.. but is it possible to change the grid cell color to red for example 15 days before the revision date arrives? Or if is not possible, is possible to display a message in same conditions when program start?


Thanks

Re: Question - date and color

I made a example for you, how to change the grid cell color.

Post's attachments

Attachment icon Color Grid date.zip 5.59 kb, 646 downloads since 2015-02-17 

Dmitry.

Re: Question - date and color

Men you are simply perfect smile

Another question.. like i already told, i'm building an inventory of products.. i wan't to have a way to save manuals...certifications etc of each product... what is the best way to do that? I have a table with a field for files.. and already have it in a form but i want something different, like list manuals and other documents for each product in a table grid for example..

Thanks once again

Re: Question - date and color

Montenegr0
You should create new table in database for files, please send me your project to support@drive-software.com
I'll try to help you.

Dmitry.

Re: Question - date and color

i think we are searching Selling products installments
Any sense of the history of the introduction of the product after 30 days the color changed to red.
that good idea.can you help us.

Re: Question - date and color

megood70 wrote:

i think we are searching Selling products installments
Any sense of the history of the introduction of the product after 30 days the color changed to red.
that good idea.can you help us.

I made the example for you

Post's attachments

Attachment icon Color Grid date after added 30 days.zip 6.02 kb, 563 downloads since 2015-02-18 

Dmitry.

7 (edited by megood70 2015-02-18 15:12:32)

Re: Question - date and color

thank you Mr.Dmitry .Good Developer.

Re: Question - date and color

DriveSoft wrote:

Montenegr0
You should create new table in database for files, please send me your project to support@drive-software.com
I'll try to help you.


another problem solved smile

Re: Question - date and color

Very nice script !

Ii took the opportunity to modify it as follows :

begin
     c := Form1.GridEmployees.RowCount - 1;
     for i := 0 to c do
     begin
         s := Form1.GridEmployees.Cells[2,i];
         if ValidDate(s) then
             if (StrToDate(s) - 15) >= now then Form1.GridEmployees.Cell[2,i].Color := clGreen;
             if (StrToDate(s) - 15) < now then Form1.GridEmployees.Cell[2,i].Color := clYellow;
             if (StrToDate(s) - 7) < now then Form1.GridEmployees.Cell[2,i].Color := clRed;
     end;
end;

The result is :
- 15 or more days -> color is green
- less than 15 days ->color is yellow
- less than 7 days -> color is red

Your tool is howesome !

Thanks for teh great work.

Math

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: Question - date and color

mathmathou
Thank you for the script )

Dmitry.

Re: Question - date and color

Thanks for the script mathmathou, I was looking for something like this smile

Re: Question - date and color

mathmathou

thanks wink good idea

Re: Question - date and color

Well actually, I could not get it to work properly using 1.50 beta. I get only red or nothing and when I use multiple rows, I have a refresh issue: first there is no colour and when I click in the grid, the cell change to red.