DataGridView OnClick [英] DataGridView OnClick

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

问题描述

大家好,


我希望在我的DataGridView列中有一个图像。


如何为此分配数据集值并允许用户点击它?


谢谢。

Hi all,

I want to have an image in my DataGridView Column.

How do I assign a dataset value to this and allow the user to click on it?

Thanks.

推荐答案

你可以遍历数据网格项目

并设置图像的URL
u can loop through the datagrid items
and set the url of the image


每个dataGridViewImageColumn行都应该有一个唯一的值。


如何循环显示?


谢谢。
each dataGridViewImageColumn row should have a unique value.

How do I loop through this?

thanks.



每个dataGridViewImageColumn行应具有唯一值。


如何循环使用?


谢谢。
each dataGridViewImageColumn row should have a unique value.

How do I loop through this?

thanks.



您可以将网址存储到您用作数据源的数据库中每行特定的图像(我假设在这里)并按照Leela的建议行事。

You could store the url''s to the images that are specific to each row in the database you''re using as your datasource (I''m assuming here) and do as Leela was suggesting.


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

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