alfardan
asked on
Displaying an Image in a DataGridView Cell
Hi
How can I add an image to a datagridview cell (rows section, not header)? I tried the following code but I got the attached datagridview which is now what I want:
How can I add an image to a datagridview cell (rows section, not header)? I tried the following code but I got the attached datagridview which is now what I want:
Dim img_down As New DataGridViewImageCell()
Dim inImg As Image = Image.FromFile(IO.Directory.GetCurrentDirectory() + "\AppImages\down_arrow.jpg")
img_down.Value = inImg
AppListOrderGridView.Columns.Add("MoveDown", "")
AppListOrderGridView.Columns.Add("Value", "")
AppListOrderGridView.Columns.Add("ApplNum", "No.")
AppListOrderGridView.Columns.Add("Priority", "Priority")
AppListOrderGridView.Columns.Add("ApplName", "Application Name")
For i = 0 To ApplicationList.Tables(0).Rows.Count - 1
AppListOrderGridView.Rows.Add(img_down, "Up", (i + 1), "P", ApplicationList.Tables(0).Rows(i).Item("Appname"))
Next
grid.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER