Go Premium for a chance to win a PS4. Enter to Win

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

blank line at end of data in datagrid

when I load a datagrid using vb.net in a form from data in a database, there is always an extra line at the bottom of the grid (to add more data I presume) .  How do you not display this extra line?
0
ddepuemd
Asked:
ddepuemd
  • 2
  • 2
1 Solution
 
jpaulinoCommented:
You can do:

Me.DataGridView1.AllowUserToAddRows = False
0
 
CodeCruiserCommented:
If you do not want the user to be able to modify cell values, set the ReadOnly property of the grid to be True.
0
 
jpaulinoCommented:
My anwser was the correct for the asked question. The accepted answer was just a comment.
0
 
CodeCruiserCommented:
This is not fair. My answer was already selected. It was not a comment but rather a more complete solution. Why is it being messed up now?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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