How to replace the HeaderCells of a DataGridView with custom headers?
问题 When to replace a DataGridViewColumnHeaderCell with a custom HeaderCell (here: CustomDataGridViewColumnHeaderCell ), when the DataSource of a DataGridView is already set to a DataTable object and also preserve the text of the previous HeaderCell, which is set to the name of the corresponding Column of the DataTable? I have a custom header class for a DataGridView : public class CustomDataGridViewColumnHeaderCell : DataGridViewColumnHeaderCell { // adds a button to the header } A DataTable is