Click here to Skip to main content
14,870,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<pre lang="text"></pre>hello I m working on one window based application form in which, I had put one datagridview control which is unbounded. On run time it will fill the datagridview but the problem is that when the user used to edit the data, it is edited. And I need to restrict that edition/or type the data in datagridview by the user at runtime.

You can set the readonly flag to true at the column or row level.
dataGridView1.Rows[0].ReadOnly = true;<br />
dataGridView1.Rows[0].Cells[1].ReadOnly = true;
hello abhinav,

I had almost try these in my code, but it doesnt work. Still it allow me to type in the cell of datagridview.. Please help me.

Thanks in advance

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