gridview和文本框 [英] gridview and textbox

查看:101
本文介绍了gridview和文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
如何比较网格视图和文本框的一个单元格数据

Hi all
How to compare one cell data of grid view and text box

推荐答案

1.获取网格的行(因此您需要逐行)
2.获得所需数据进行比较的单元格的控件.如果需要,请使用findcontrol方法.
3.有一个单元格控件,从中获取数据,然后将其与放置在文本框中的另一数据进行比较.
1. Get the row of grid (so you need to go row-by-row)
2. Get the control of the cell you want data for comparison. Use findcontrol method if needed.
3. One you have the cell control, get data out of it and then compare it with another data placed in a textbox.


Grid.Rows [rowindex] .Cells [cellindex] .Text

在网格视图中给出值

然后使用您的文本框值对其进行检查
Grid.Rows[rowindex].Cells[cellindex].Text

gives the value in grid view

then checck it with ur textbox value


这篇关于gridview和文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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