Reputation: 213
i am working on a windows form data-grid. there are six column in it. ["A"], ["B"], ["C"], ["D"], ["E"], ["F"] i need column "C" and "D" to be non editable once any data is inserted in it. i have tried with ReadOnly but it doesn't solve my problem. how this can be done? thanks in advance.
Upvotes: 1
Views: 1479
Reputation: 58
If you have to make your grid column read only one by one, use:
dataGridView1.Columns[2].ReadOnly = true; // for C
dataGridView1.Columns[5].ReadOnly = true; // for D
Upvotes: 2