WinForms DataGridView:从列名中搜索值的行索引吗? [英] WinForms DataGridView: Search for row index of value from column name?

查看:124
本文介绍了WinForms DataGridView:从列名中搜索值的行索引吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表单上有一个DataGridView,gridview有5列,x行.
用户可以填写表格以在表中添加新行并删除选定的索引.
数据表:

名称类型事件容器图像

obj1 typ1 event1 cn1 c:/obj1.png

obj2 typ2 event2 cn2 c:/obj2.png




我需要遍历所有行名,以从名称"列中找到"obj2".

我需要找出行中的第一个单元格是否包含"obj",以告诉我它是否存在.

I have a DataGridView on a form, the gridview has 5 columns, and x amount of rows.
The user can fill out a form to add a new row to the table and delete a selected index.
DataTable:

Name Type Event Container Image

obj1 typ1 event1 cn1 c:/obj1.png

obj2 typ2 event2 cn2 c:/obj2.png




I need to loop through all of the row names to find "obj2" from column "Name".

I need to find out if the first cell in a row contains "obj", something to tell me if it exists or not.

How do I do this in code?

推荐答案

您的问题不足以理解问题所在,请解释您想要的内容以及您在哪里面临的问题?
your question is not enough to understand problem cab u explain what u want and where u facing problem ?


这篇关于WinForms DataGridView:从列名中搜索值的行索引吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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