TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Violeta Popa
NA
137
164.1k
image in datagridview
Apr 15 2013 4:00 PM
Hello :)
I'm trying to display image in datagridview cells, depending on a condition. My code seems right but i don't know why it doesn't display anything.
for (int k = 0; k <= calculGridView.Rows.Count-1; k++)
{
Image img;
DataGridViewImageCell cell = (DataGridViewImageCell)calculGridView.Rows[k].Cells["image"];//image is a datagridviewimagecolumn
if (calculGridView.Rows[k].Cells["societate"].Value.ToString() == "BetaCar")
{
img = Image.FromFile(@"C:\\Users\\Vio\\Desktop\\New folder\\betacar.jpg");
cell.Value = img;
}
}
Does anybody know what's wrong? or maybe another solution?
Reply
Answers (
3
)
profile
How to disable mouse right click in ms word using c#