how to assign a cell value to a grid view control cell from a string variable(local variable) using VB.net
After the gridview is populated, I would like to insert some data into one of the cells in a row in edit mode.
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.
Create a label in the cell that is being bound, but leave it unbound. Then in the RowDataBound event you can find the label in the cell and populate it with the value you want.
You can also do this with a literal, panel, etc. The key is to make sure you get the index right and make sure that you use the name provided in the ItemTemplate when using the FindControl method.