what's the difference in colors or why 2 DataRows for one record?
I think that you are a little confused here. There is only one DataRow per
record, however the Watch window does change color on every iteration of
e.Row.RowType. That is an interesting observation and it is a result of the
IDE color coding variables that have been changed (black for no change, red
for change).
So your output should be:
e.Row.RowType Header (Black)
e.Row.RowType DataRow (Red)
e.Row.RowType DataRow (Black)
e.Row.RowType Footer (Red)
for a table that has 2 rows.
Since the base types for the row is the same for header, datarow and footer,
the behaviour that you see is consistent. The first time around a new Datarow
row of type header is created, hence the black color. Then on the second
iteration, that variable's type gets changed to dataRow, hence the red color.
On the third iteration, the type stays the same, hence the black color
(unchanged). On the last iteration, the type gets changed to Footer, hence
the red color (changed).
Hope that gives you a clearer understanding of what the changing colors mean.
--
With Regards
Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(
http://www.ashlen.net.au)