dataGridView にいくつかの画像を表示したいのでDataGridViewImageColumn
、デフォルトの画像(Properties.Resources.test
)で作成し、それを追加しdataGridView
てセルにいくつかの値を挿入しようとしました。残念ながら表示は変わりませんでした。私は何を間違っていますか?
var q = from a in _dc.GetTable<Map>() select a;
View.dataGridView1.DataSource = q;
View.dataGridView1.Columns[3].Visible = false;
var imageColumn = new DataGridViewImageColumn
{
Image = Properties.Resources.test,
ImageLayout = DataGridViewImageCellLayout.Stretch,
Name = "Map",
HeaderText = @"map"
};
View.dataGridView1.Columns.Add(imageColumn);
var i = 0;
foreach (var map in q)
{
View.dataGridView1.Rows[i].Cells[8].Value = ByteArrayToImage(map.map1.ToArray());
i++;
}