Search code examples
c#datagridviewdatagridviewcolumn

Some columns in a DataGridView is readonly


Is it possible that only selected columns in a datagridview is readonly? If so, how should I do it?


Solution

  • Please refer to this sample;

    dataGridView1.Columns["CompanyName"].ReadOnly = true;
    

    Re: http://msdn.microsoft.com/en-us/library/cze614bb%28v=vs.90%29.aspx

    Hope this will help. Regards,