Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C# : I am working on a access based Database application. In which DataGridView has some text and date columns. Date columns are programmed for appear red when system time and cell dates are same. I want DataGridView to automatically active in background so that when time is over i.e Cells are Red. A system tray notification may appear and on click of that notification application should be open. In this required no idea for code as i am not very expert. Please help. Thanks in advance.

What I have tried:

I was just able to paint my datagridview cell Red. Unable to do in this regard.
Posted
Updated 14-Mar-19 10:52am

System tray notifications are typically modeless so that they don't interfere with apps running on the desktop.

To set a cell's background color, do something like this:

C#
DataGridViewCellStyle style = new DataGridViewCellStyle();
style.BackColor = Color.FromArgb(255,0,0);
style.ForeColor = Color.Black;
row.Cells[color.Index].Style = style;
 
Share this answer
 
v2
Comments
Member 13870676 14-Mar-19 16:20pm    
Thanks for answer sir, but i was asking that "how datagridview keep active in background because i have set a condition in cellFormatting event." I put some code in cellFormatting event so that my datagridview's date cell automativally turn Red when system date will be same as cell's date. I just want system tray notification on cell becoming Red.
 
Share this answer
 
Comments
Member 13870676 15-Mar-19 2:25am    
Unable to fetch the idea. Can u provide some code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900