如何将gridview中的每一行与标签文本进行比较: [英] How to compare every row in gridview with label text:

查看:62
本文介绍了如何将gridview中的每一行与标签文本进行比较:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将gridview中的每一行与标签文本进行比较:

有一个gridview,其中包含10条记录,其中包含UserID和UserName ....,共5列.存在一个标签,该UserName存在.在这里,我的要求是,gridview中的每个记录都可以与Label文本进行比较.如果两者相等,则转到下一条语句.

How to compare every row in gridview with label text:

There is a gridview with 10 records with UserID and UserName....as total 5 Columns. There is a label, in that UserName is existing. Here my requirement is, each record in gridview can compare with Label text. If both are equal then comes to the next statement.

推荐答案

您没有确切说明您要尝试执行的操作,但在我看来,您应该确实是将Label中的用户名与GridView的基础数据源进行了比较.

也许如果您解释自己在做什么,将会得到更多相关的帮助.
You do not explain precisely what it is that you are trying to do but it seems to me that you should really be comparing the username in the Label against the underlying datasource of the GridView.

Perhaps if you explain what you are doing, you will get more relevant help.


您可以使用RowCreated或RowDatabound方法.
You can use RowCreated or RowDatabound method.


这篇关于如何将gridview中的每一行与标签文本进行比较:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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