VB.net DataGridView - only allow rows to be added programmatically

Hi

I have a DataGridView on a Windows form where I only want to add rows programmatically.
I don't want users to add rows. How do I do this?

Thanks
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Robert SchuttConnect With a Mentor Software EngineerCommented:
Just set the property AllowUserToAddRows to False.
captureor programmatically:
DataGridView1.AllowUserToAddRows = False

Open in new window

0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Great! Thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.