问题描述
我在表单上有一个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?
推荐答案
这篇关于WinForms DataGridView:从列名中搜索值的行索引吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!