lundi 29 janvier 2018

In an existing DataGridView, replace textual header of one column with a checkbox (for sorting capabilities)

I need to replace textual header of a column in an existing DataGridView. With this checkbox I will then control sorting of the values in cells below.

I tried:

DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn();
checkBoxColumn.TrueValue = true;
checkBoxColumn.FalseValue = false;
checkBoxColumn.Width = 80;

but this just gave me checkbox in cells.




Aucun commentaire:

Enregistrer un commentaire