根据今天的日期更改背景颜色 [英] Change Background color according to Todays Date

查看:105
本文介绍了根据今天的日期更改背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据今天的日期更改背景颜色
==========================================


尊敬的朋友,

这是一个铁路项目.并正在使用asp.net c#,sQlserver 2005

我有一个带有DAYS列的GRIDVIEW,因为我有M,T,W,Th,F,S,Su.

我在GRIDVIEW中有一个这样的天专栏:

日期DAYS
================================

25/07/2012 M T W TH F S SU

2012年7月26日M T W TH F S SU

26/07/2012 0 T W 0 F S SU

26/07/2012 0 0 0 0 F 0 SU

27/07/2012 M T 0 0 0 0 SU

28/07/2012 0 0 0 0 0 0 SU

29/07/2012 0 0 0 0 0 0 SU


假设,如果火车是今天的日期(2012年7月29日),则只有M和W可以更改背景颜色...,以便用户可以知道这列特别的火车是在这一天.


请帮忙,谢谢.

Change Background color according to Todays Date
==============================================


Dear Friends,

This is a railways project. and am using asp.net c#,sQlserver 2005

I have a GRIDVIEW with column DAYS, in that I have M,T,W,Th,F,S,Su.

I have a days Column like this IN GRIDVIEW :

Date DAYS
=================================

25/07/2012 M T W TH F S SU

26/07/2012 M T W TH F S SU

26/07/2012 0 T W 0 F S SU

26/07/2012 0 0 0 0 F 0 SU

27/07/2012 M T 0 0 0 0 SU

28/07/2012 0 0 0 0 0 0 SU

29/07/2012 0 0 0 0 0 0 SU


Suppose, if the train is on todays date(29/07/2012) only M and W should change the background color...so the users can know that this particualr train is on this day.


Please help, Thanks.

推荐答案


检查此
如何更改网格的行颜色查看或突出显示满足特定条件的行 [
Hi ,
Check this
How to change the row color of grid view or highlight the row if it meet certain condition[^]
Best Regards
M.Mitwalli


这篇关于根据今天的日期更改背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆