Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

WinForms DataGrid - how to prevent adding new rows

I have a dataGrid on a winfows form which is bound to a data set.
It works fine and I want users to be able to edit the values in the grid.
However, there is always an extra line at the bottom which when clicked on allows the adding of a new row.
How can I stop this ?
Is it set in the DataGrid or in the underlying data source.
I know I can stop new rows being commited to the dataset, but what I really want is for this extra data entry line to not even appear in the grid.

Cheers.
0
ozymandias
Asked:
ozymandias
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you might also check this:

setting the AllowNew property of the DataView to false.
0
 
ozymandiasAuthor Commented:
Thanks. Didn't realise I had to stick a DataView between my Grid and Data to get this functionality.
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.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now