I think my question title is quite straight forward.
Any help is appreciated..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With BoundField and in readonly mode you can use
GridView1.Rows[x].Cells[x].Textbut with edit mode you have to use Controls collection to get reference of a control. This method returns aControlobject.If template field is used then you have to issue
FindControlmethod from theCellscollection to get reference of a control based upon itsID. You may also useCells[x].Controlscollection too.EDIT:
It is also possible that there can be one or more controls having same name/ID across the Templatefields. In that case you can’t use
FindControlmethod.Example:
Now to get Button and change its text from 2nd row and 1st cell: