datagridviewcellstyle

SelectionForeColor not working for link cells in DataGridViewLinkColumn of DataGridView

时光总嘲笑我的痴心妄想 提交于 2021-01-27 18:17:06
问题 In my Winform 4.5 app, I have a DataGridView with first column as a link column. I would like to have the link color of the selected link cell to be white. Since by default the background color of a selected row (or a cell) is blue and the ForeColor of all the links are also blue, when user selects a row (or a link cell) the text of the link is not readable. I tried writing the following code but it does not change the link color of selected link cell at all. private void dataGridView1