Hi,
I'm hitting a problem trying to initialize rows. In my initialize rows event handler, I look at VisibleHeaders under certain conditions. Basically, I color the row's background yellow, then loop for some number of times turning the cell's background white, starting from the left and moving right.
The problem is that the first IntializeRow event fires, and VisibleHeaders is dirty, and contains no items. This is cause an exception in my code. How can I get around this?
Thanks
Andy
No, because VisibleHeaders never is null, it's just empty (Count = 0).
I did add a check, but the problem is that my rows have not been properly initialized, because the event doesn't refire unless I tell the grid to do so explicity, and I'm not sure when it would be valid to do so before the painting is done.
Hi Andy,
If the grid hasn't painted yet, then the VisibleHeaders will not have been created. Have you tried just checking for null?