Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make a single column of griddview readonly.I am showing gridview at runtime i.e after user selct items from combobox...
Posted
Comments
Prasad_Kulkarni 23-Apr-12 3:02am    
Glad my answer helps!
Thanks for accepting the solution.

You just need to make your datagridView's Read only property to True;

In Windows:
C#
dgvSearchResults.Columns["ColumnName"].ReadOnly = true;


In Web:
C#
((BoundField)dgvSearchResults.Columns[columnIndex]).ReadOnly = true;


Hope it helps.
 
Share this answer
 
 
Share this answer
 
Comments
Prasad_Kulkarni 23-Apr-12 1:16am    
Hi, P.Salini do you know GIT[^]
P.Salini 23-Apr-12 1:27am    
I don't know. What is it?
Prasad_Kulkarni 23-Apr-12 1:53am    
It's a general discussion forum for Indian people. Be active there. You are really nice in answering in QA. Hope to see you there. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900