Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get reference to DataItem
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01328496
Message ID:
01328550
Vues:
7
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform