Click here to Skip to main content
12,291,271 members (59,825 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

5.7K views
1 bookmarked
Posted

How to get Hidden Column Value in GridView

, 18 Jun 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Alternative way for 1B, this one is way faster :) : protected void btnSelect_Click(object sender, EventArgs e) { Button btn = (Button)sender; DataControlFieldCell dfc = (DataControlFieldCell)btn.Parent; GridViewRow gvr =...
Alternative way for 1B, this one is way faster Smile | :) :

protected void btnSelect_Click(object sender, EventArgs e)
{
 
    Button btn = (Button)sender;
    DataControlFieldCell dfc = (DataControlFieldCell)btn.Parent;
    GridViewRow gvr = (GridViewRow)dfc.Parent;
    Label lblAddressId = (Label) gvr.FindControl("lblAddressId");
 
    int iAddressId = (int)  lblAddressId.Text;
    lstAddressId.Add(iAddressId);
 
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

wouter vegter
Unknown
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralHi Is there any possibility to get item template information... Pin
Member 445197619-Jan-12 8:15
memberMember 445197619-Jan-12 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160518.1 | Last Updated 18 Jun 2010
Article Copyright 2010 by wouter vegter
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid