Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

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

Comments and Discussions

 
GeneralHi Is there any possibility to get item template information... PinmemberMember 445197619-Jan-12 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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.141223.1 | Last Updated 18 Jun 2010
Article Copyright 2010 by wouter vegter
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid