paint rectangle on column header

后端 未结 1 942
日久生厌
日久生厌 2021-01-23 23:33

I\'m painting rectangle on the column headers in datagridview but on scrolling to right it disappears as in the picture (scroll.png)

相关标签:
1条回答
  • 2021-01-24 00:17

    I have tested your code and the line responsible for the behaviour you are describing is this.dataGridView1.Invalidate(rtHeader);

    Thus you have two solutions:

    • Deleting the aforementioned line.
    • Or putting the rectanges in the cells (in the first row, would be fine), rather than in the headers.
    0 讨论(0)
提交回复
热议问题