string fileName = "C:\\Users\\Shahid\\Pictures\\Picasa\\word.gif";
FileInfo fileInfo = new FileInfo(fileName);
byte[] binaryData = File.ReadAllBytes(fileName);
MemoryStream ms = new MemoryStream(binaryData);
Image returnImage = Image.FromStream(ms, false, true);
dataGridView1.Rows[i].Cells[2].Value = returnImage;
dataGridView1.Rows[i].Cells[2].ToolTipText = fileInfo.ToString();
這將在我的DataGridViewCell中顯示「System.Drawing.Bitmap」而不是圖像。在特定單元格中顯示圖像datagridview c#
更新我!
請勿將iconColumn指定給Cells [2]值,它的工作方式不同,請參閱以下鏈接中的示例... –