Wrox Programmer Forums
|
.NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 4th, 2013, 05:57 AM
Registered User
 
Join Date: Sep 2013
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Disabling auto added a new row on DataGridView

Dear friends,

Every time I change value in the bottom row of the DataGridView cell , the DataGridView will automaticaly generate a new row below, I want to change this behavior, and try changing this behavior trough DataGridView property, but I did not find one to stop this behavior.

I want to use enter key to adding new row to the DataGridView when the cursor reach the end cell on the bottom row.

Thanks for your attention, if you know how to resolve this problem please let me know.
 
Old September 29th, 2013, 08:54 AM
Registered User
 
Join Date: Sep 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default A possibility...

Hello,

Have you looked at re-focusing onto a new line upon keystroke? you could try something like the following in the Forms' Event handler:

Quote:
If e.KeyValue = Keys.Enter Or **EndCellName**.Focus = True Then
**NewCellName**.Focus()
End If
Not sure this will totally fix your problem, but it may give you a start!
Wasp.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to do an automation for copy paste, added new row (macro) jpol Excel VBA 1 March 3rd, 2013 10:00 PM
DATAGRIDVIEW AND TAB Through the row capacitor143 VB.NET 2002/2003 Basics 0 June 6th, 2010 09:19 PM
C# - Only new row to be readonly false in Datagridview ismailc C# 2005 0 May 26th, 2009 02:30 PM
DataGridView - how to delete Row AccessAasif@aol.com C# 2005 0 November 25th, 2007 06:43 AM
DataGridView Auto Format? MLyons10 C# 2005 0 December 5th, 2006 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.