If I copy'n'paste your code into a test app and load it with data using the DGV DataSource to a DataTable, then it works exactly as I would expect - the single column of cells becomes editable, all the others don't.
Unless I set the whole DGV.ReadOnly property to
true
- in which case I see what you get: changing the individual cell property does not take effect at all.
Which is exactly what I'd expect: the "whole control" property should supercede the "local cell" property.
[edit]
There is a much shorter, simpler way to do what you want though: just set the column.ReadOnly property. You can do this in the designer, or programmatically:
foreach (DataGridViewColumn dgCol in ProductsDataGridView.Columns)
{
dgCol.ReadOnly = dgCol.Name != "OrderQuantity";
}
[/edit]