>>in RowDataBound method produces null as view, though I can see DataItem for the Row and all the columns while executing line by line.
>>
>>Do you see what may be wrong here?
>>
>>Same code works fine in another Grid. The difference here is that this grid uses DataObject as its DataSource, doesn't have
>
>See my other reply. You need to cast to the correct type. When you're trying to debug this sort of thing, I'd suggest setting a breakpoint at the point in this code. Click on the Watch tab at the bottom and enter e.Row.DataItem - the debugger should show it's actual type to the right of the variable value (if you're not sure what you need to cast to).
I was watching it in the Debugger, but didn't notice the type. I'll try in a minute.
If it's not broken, fix it until it is.
My Blog