通过使用列和行在gridview中查找某个单元格

发布于 2024-08-29 08:13:09 字数 389 浏览 3 评论 0原文

我有一个由模板字段组成的填充网格视图。我想使用行和列的值查找/检查一定数量的单元格。

例如:


|时间|col1|col2|col3|col4|col5|

|1200|------|-----|-----|-----|-----|

|1300|------| -X- |-----|------|-----|

|1400|------|-----|-----|-----|-----|

假设我的行值为“1300”,列标题文本为“col2”,我想找到标记为“X”的单元格并检查某些条件并在必要时更改文本(col1 - col5 是模板字段由标签和按钮组成,因此根据某些条件我想显示/隐藏标签/按钮或更改标签的文本)

谢谢

I have a populated gridview that consist of template fields. I would like to find/check a certain number of cells using values of rows and columns.

Eg:


|Time|col1|col2|col3|col4|col5|

|1200|------|-----|-----|------|-----|

|1300|------| -X- |-----|------|-----|

|1400|------|-----|-----|------|-----|

lets say i have the value "1300" for the row and the column header text "col2", I would like to find the cell marked "X" and check for some condition and change the text if necessary (col1 - col5 are template fields made up of labels and buttons, so therefore base on certain conditions i would like to show/hide the labels/buttons or change the text for the labels)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

邮友 2024-09-05 08:13:09

旧线程因此值得:

更改颜色: 更改基于条件的GridView行颜色

显示/隐藏按钮:有条件地隐藏Gridview 中的 CommandField 或 ButtonField

希望对其他人有帮助。

Old thread so for what it's worth:

Changing color: Change GridView row color based on condition

Show/hide a button: Conditionally hide CommandField or ButtonField in Gridview

Hope that helps anyone else.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文