Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
How can we image display in data gridview column in c# .net
Ankit Agarwal
Dec 2 2013 4:57 AM
10.3k
Reply
Hello,
I am using this code for display image in datagridview existing column, only "System.Drawing.Bitmap" displayed in my datagridview column.
My image column datatype is varchar(max).
<pre lang="cs">foreach (DataGridViewRow row1 in dgvDisplayTiles.Rows)
{
string imgPath;
imgPath= (Application.StartupPath + row1.Cells[3].Value.ToString());
Image imageFloorTile = Image.FromFile(imgPath);
if (imgPath != null)
{
//img.Image=imgPath;
row1.Cells[3].Value = imageFloorTile;
}
else
{
MessageBox.Show("Invalid Path");
}
}</pre>
How can we image display in data gridview column in c# .net windows application?
Please help me.
Thanks in advance.
Ankit Agarwal
Software Engineer
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
method
Treeview