ic ic

ic ic

  • NA
  • 85
  • 0

DatagrifView AlternatingRowsDefaultCellStyle overides the DefaultCellStyle.BackColor

Sep 29 2009 9:18 AM

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)