AD
Administrator
Syncfusion Team
September 23, 2005 10:58 PM UTC
You cannot assume that the cells are being painted in any particular order. You code assumes _blnColourChanger is being set in some kind of alternating order. This will not work.
So, in your line,
>>if (e.RowIndex > 0 && e.ColIndex > 0 && _blnColourChanger)
you will have to replace _blnColourChanger with some logical condition that is completely detertermined by the information passed in through the event args (e.RowIndex, e.ColIndex and e.Style), and does not assume any particular paint order.