我通过以下代码将值设置为表单加载中 datagridview 中的按钮:
DataGridViewButtonColumn btnDelete = new DataGridViewButtonColumn();
btnDeleteText = "Delete";
btnDelete.HeaderText = "Delete";
btnDelete.DataPropertyName = "btnDelete";
btnDelete.UseColumnTextForButtonValue = true;
dgvPur.Columns.Insert(0,btnDelete);
但运行完成后,按钮文本为空。