Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get reference to DataItem
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to get reference to DataItem
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01328496
Message ID:
01328496
Vues:
44
Hi everybody,

This code
if (e.Row.RowType == DataControlRowType.DataRow)
    {

        LinkButton link = e.Row.FindControl("lnkbtnRemoveRole") as LinkButton;

        if (link != null)
        {
             
            DataRowView view = e.Row.DataItem as DataRowView;
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 select button and has template field. May be select button makes all the difference? Let me try to add it.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform