i have an asp.net c# application.
my gridview has a datasource that has 2 fields.
1 field cannot be edited by the user, but i need the other one to be editable!
is this possible to do?
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.
Set the
ReadOnly="true"property on all that you don’t want editable.Take a look at http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.readonly.aspx
A quick example from that page
In this case CustomerID and Company name are read only and can’t change. Address, City and PostalCode can be edited.
Just set the ReadOnly option to true on the columns you DON’T want people to edit. The columns that don’t have this set or have ReadOnly set to false are editable by the user when in edit mode.