t.Columns.Add("ID", typeof(int));
t.Columns.Add("photo", typeof(Image));
newrow["ID"] = (int)member.memberId;
newrow["photo"] = (int)(int)member.memberId;
我有個程序本身已經可以獲取ID , 現在我想增加顯示圖片功能 , newrow["photo"] = (int)Pokemon.PokemonId; 應該要改成 /jpg/ (int)member.memberId.png , 但我完全不懂語句是什麼 ?
請求指點!!!
DataGridViewImageColumn img = new DataGridViewImageColumn();
Image image = Image.FromFile("Image Path");
img.Image = image;
dataGridView1.Columns.Add(img);
img.HeaderText = "Image";
img.Name = "img";