Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I click a button then a ridview named "grdMaterial" will load with data. Gridview has a checkbox in position 0. I want the gridview will load without showing Checkbox
Or the checkbox will be disabled
How can I make a gridview control readonly in asp.net c#. Please help me
Posted
Updated 18-Feb-14 18:18pm
v2
Comments
OPees 18-Feb-14 23:55pm    
means?
Ankur\m/ 19-Feb-14 0:15am    
Yes. Have literal controls rather than input controls.

1 solution

As far as I know you can't make entire gridview as ReadOnly, So instead what you can do is,
C#
// Form App GridView
dataGridView1.Columns["ColumnName"].ReadOnly = true;
//Web App GridView
((BoundField)gridView1.Columns[columnIndex]).ReadOnly = true;

-KR
 
Share this answer
 

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