Click here to Skip to main content
14,932,407 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
It is possible to have a DataGridView control in a winform app(written in C# 4.0) where some columns will be editables and others do not? How? There is another way to solve the problem?

Suppose I wanna show two columns in my DataGridView control: "Number" and "IsPrime", the "Number" column will be untouchable while "IsPrime" is a bool column where you can set if the number is prime or not.

Yes, of course! Set the ReadOnly property for the column to true and it won't be editable.
yes u can do this. Walt is right set ReadOnly property to true of that column which u dont want to edit and whichone u want to be editable set ReadOnly property to False simple...
Yes, The Read Only property for column will help you to achieve this

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

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