Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataBound GridView - accessing fields in RowBound method
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
DataBound GridView - accessing fields in RowBound method
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01310810
Message ID:
01310810
Vues:
54
Hi everybody,

How can I access fields my GridView is bound to in its RowBound method?

Here is what I'm trying to do:
 if (e.Row.RowType == DataControlRowType.DataRow)
        {

            ImageButton btnDelete = (ImageButton)e.Row.Cells[1].Controls[0];
            string PersonName = 
            e.Row.ToolTip = "Delete " + PersonName  ;

            btnDelete.Attributes.Add("onClick",
                "var ch=confirm('Do you want to delete " +
                PersonName + "?');if(ch==false) return false;");

            btnDelete.CommandName = "Delete";
        }
    }
but I could not figure out how to access LastName and FirstName from my GridView.

Thanks a lot 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