禁用于行,其中字段不为空gridview的链接? [英] Disable gridview link on rows where field is not null?

查看:101
本文介绍了禁用于行,其中字段不为空gridview的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp的GridView,我想禁用编辑超链接字段上的行状态字段是什么,但新建。我需要这个什么逻辑?

I've got an asp gridview where I want to disable the edit hyperlink field on rows where the status field is anything but "New". What logic do I need for this?

推荐答案

这已经有一段时间,但我认为你需要连接到的的RowDataBound 事件 GridView控件然后访问该超链接的基础上使用该行的数据禁用它。

It's been a while, but I think you need to attach onto the RowDatabound event of the GridView and then access that hyperlink to disable it based on the data used for that row.

这篇关于禁用于行,其中字段不为空gridview的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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