?
Solved

WinForms DataGrid - how to prevent adding new rows

Posted on 2006-10-31
3
Medium Priority
?
320 Views
Last Modified: 2008-02-01
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
Comment
Question by:ozymandias
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17840760
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1200 total points
ID: 17840762
you might also check this:

setting the AllowNew property of the DataView to false.
0
 
LVL 15

Author Comment

by:ozymandias
ID: 17840815
Thanks. Didn't realise I had to stick a DataView between my Grid and Data to get this functionality.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question