I have a boundfield in a gridview. How can I change the boundfield to a textbox only for a specific column?
I tried
BoundField colname= new BoundField();
grid.Columns.Add(colname as TextBox);
But it goves a cast expression
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.
I’m not sure if this will work for your situation, but you could try using a template field, like this:
EDIT: Adding TextBox to item template from code behind:
EDIT: Setting text of dynamically added TextBox