如何根据某些条件更改gridview中行的颜色 [英] How to change color of rows in gridview based on some condition

查看:73
本文介绍了如何根据某些条件更改gridview中行的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列datetime的gridview。我有一个变量dt(datetime),它获取当前的系统日期时间。

我需要从gridview中获取日期,如果它小于当前日期,那行的背景颜色应该变为其他颜色。应该改变满足该条件的所有行的颜色.....

I've a gridview with column datetime. I've a variable dt(datetime) which gets current system datetime.
I need to fetch the date from the gridview and if it is less than current date, that row's backcolor should change to some other color. Should change color for all rows which satisfies that condition .....

推荐答案

根据列值更改单个DataGridView行颜色 [ ^ ]


这篇关于如何根据某些条件更改gridview中行的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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