我DataGridViewImage
为我的DataGridView
.
DataGridViewImageColumn guardar = new DataGridViewImageColumn();
{
guardar.HeaderText = "";
guardar.Name = "guardar";
guardar.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
guardar.CellTemplate = new DataGridViewImageCell();
guardar.Image = Properties.Resources.empty_grilla;
guardar.ToolTipText = "Guardar";
}
dgv_Bancos.Columns.Add(guardar);
问题是当我想更改特定单元格的图像时,它并没有改变。
这是我的代码,请帮忙,我不知道有什么问题
DataGridViewImageCell cell = (DataGridViewImageCell)dgv_Bancos.Rows[e.RowIndex].Cells["guardar"];
cell.Value = Properties.Resources.guardar_grilla;
解决!