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:
01328550
Views:
6
This message has been marked as the solution to the initial question of the thread.
>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).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform