5
Answers

DatagrifView AlternatingRowsDefaultCellStyle overides the DefaultCellStyle.BackColor

ic ic

ic ic

15y
8.6k
1

Hi,
I want to change a columns background color: dgvtxbQty.DefaultCellStyle.BackColor = System.Drawing.Color.White;
But on the Grid I have a AlternatingRowsDefaultCellStyle which set every other row format.
The problem is it overides the dgvtxbQty.DefaultCellStyle.BackColor  & the backcolor only works for the rows not being set by the AlternatingRowsDefaultCellStyle
Is there a way around this?
Regards
Answers (5)