在网格视图中验证开始日期和结束日期 [英] validating start date and end date in grid view

查看:78
本文介绍了在网格视图中验证开始日期和结束日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可编辑的网格视图.有10行带有开始日期"和结束日期"列.
2011年4月1日2011年1月1日(有效行)
2011年1月2日2011年3月3日(有效行)
2011年3月1日2011年1月21日(无效-已编辑的行)
我应该检查是否有任何行的开始日期位于现有日期范围内,并且是否需要显示错误消息.
有人可以帮我给出逻辑吗?

I have a grid view which is editable.There are 10 rows with column "start date" and "end date".
4/1/2011 17/1/2011 (valid-existing row)
1/2/2011 3/3/2011 (valid-existing row)
3/1/2011 21/1/2011 (Invalid - edited row )
I should check whether there is any row having start-end dates lying within the existing date range and if there any i need to show error message.
Can any one help me to give the logic please

推荐答案

看看这个:

http://msdn. microsoft.com/es-es/library/system.web.ui.webcontrols.gridview.rowediting%28v=vs.80%29.aspx [
Take a look at this:

http://msdn.microsoft.com/es-es/library/system.web.ui.webcontrols.gridview.rowediting%28v=vs.80%29.aspx[^]

Change the line
if (country == "USA")


进行日期验证.

如果您需要更多帮助.请发布您的代码.

问候...


for your date validation.

If you need more help. Please post your code.

Regards...


这篇关于在网格视图中验证开始日期和结束日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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