• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • 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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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