Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get reference to DataItem
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01328496
Message ID:
01328588
Views:
6
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform