How to work on gridviewcells
how to work on gridviewcell and how to find control in gridview.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaish MathewsRank #225 · 11K reputationPosted Apr 30, 2012, 2:11 AM EDT
GridView can highly customized. So 1 or 2 example can't cover it's scope and there's no shortcut. So try as many options possible and like that only you will be flexible wiht it. You will get a good start here http://blogs.msdn.com/b/bgold/archive/2005/05/05/415106.aspx
MuthuMari MRank #5,738 · 288 reputationPosted Apr 30, 2012, 2:27 AM EDT
you have to use findcontrol method.
foreach(GridViewRow row in GridView1.Rows) { if(row.RowType == DataControlRowType.DataRow) { HyperLink myHyperLink = row.FindControl("myHyperLinkID") as HyperLink; // like this u have to use all the controls) } }pls refer this url for more :
http://www.codeproject.com/Articles/41837/Reference-GridView-Cells-Using-Column-Names
thanks.
If this post is useful then mark it as "Accepted Answer"
Satyapriya NayakRank #47 · 31.5K reputationPosted Apr 30, 2012, 5:36 AM EDT
Please refer the below link
http://www.codeproject.com/Articles/12021/Accessing-the-different-controls-inside-a-GridView
Thanks