Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

Using ReadOnly with a DataGridView?

The following code isn't working:

dataGridView1.ReadOnly = True
dataGridView1.Columns(1).ReadOnly = False

Open in new window


The above code doesn't allow me to enter data manually in Column 1 of the dgv.

I have a dgv that contains 15 columns and I only want to 2 of them to be able to enter data manually. I'm doing the above method just to save lines of code (not that big of deal really). Just wondered if there was a way of doing this without having to set all the Columns.ReadOnly = True?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BlakeMcKenna

ASKER

Thanks for the clarification!