嵌入图像im datagridviewimagecolumn问题 [英] embded image im datagridviewimagecolumn problem

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

问题描述

iam正在研究c#4解决方案
我有datagridview
我将datagridviewimagecolumn添加到datagrid
我从设计而不是代码中嵌入资源给它固定图像
在设计中和运行时出现默认(x图像),而我的图像没有出现
那么probelm

iam working on c# 4 solution
i have datagridview
i add datagridviewimagecolumn to datagrid
i give it fixed image from embded resource from design not from code
in design & in the run the default (x image) appear & my image doesn''t appear
so what is the probelm

推荐答案

没有代码,很难说,但是...
你有行吗?如果没有,则无法显示图像.
试试这个:
1)在表单中添加一个按钮
2)在按钮的单击代码中,添加以下内容:
Without your code it is difficult to tell, but...
Do you have any rows? If not, then no image can be displayed.
Try this:
1) Add a button to your form
2) In the button click code, add the following:
dataGridView1.Rows.Add(2);


3)运行您的应用.
4)按下按钮.
您现在看到图像了吗?


3) Run your app.
4) Press the button.
Do you see your image now?


这篇关于嵌入图像im datagridviewimagecolumn问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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