Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to refer to data in BoundField in GridView
Message
 
 
À
04/01/2011 13:08:45
Frank Cazabon (En ligne)
Samaan Systems Ltd
St Augustine, Trinidade
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01494623
Message ID:
01494627
Vues:
36
>Hi,
>
>I have a gridview with this column defined:
>
>
<asp:BoundField DataField="AgentPK" HeaderText="AgentPK" Visible="False" />
>
>When looping through the rows in the grid I want to check what value this column has. How do I refer to it?
>
>If I define another column like this:
>
>
<ItemTemplate>
>     <mm:mmCheckBox ID="chkSelector" runat="server" Text="" />
></ItemTemplate>
>
>Then I can refer to it like this:
>
>
CheckBox cb = (CheckBox)(row.FindControl("chkSelector"))
>
>Do I need to use an ItemTemplate in order to get the value of my AgentPK field?

Here is also how I used it in the past (originally got the advice from Paul M):

Re: Why this code returns null? Thread #1347651 Message #1347676
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform