PC Review


Reply
Thread Tools Rate Thread

Data-bound DataGridView creates bogus empty rows

 
 
JustinD30324@gmail.com
Guest
Posts: n/a
 
      5th Jul 2008
Hello. I have a DataGridView that is bound to a DataTable. If the user
types in values for all the columns for the first row, then clicks
into a column in the second row (empty), and then clicks back into the
first row he just typed, then an empty row is added to the
DataGridView. I'm guessing that somehow the AddRow function is being
called when the user clicks in and out of the empty row. I don't want
this to happen. A new row should only be added to the DataGridView if
the user types in valid values for all the columns. Does anyone know
how to fix this? Thanks.

Justin
 
Reply With Quote
 
 
 
 
Munna
Guest
Posts: n/a
 
      6th Jul 2008
Hi,,

I guess you are using "Inserting a New Record from the GridView’s
Footer" technique...
http://www.asp.net/learn/data-access...ial-53-vb.aspx
hiding the footer suppose to solve the problem


Best of luck

------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView creates too many new rows when inserting new data JT Microsoft VB .NET 5 15th Sep 2009 05:02 PM
Binding List<T> to a DataGridView = DataGridView Empty admlangford@gmail.com Microsoft C# .NET 3 1st Oct 2008 07:59 AM
dataGridView.Rows.Count and datagridview.RowCount SePp Microsoft C# .NET 1 15th Jan 2008 11:27 AM
HEUR-DBLEXT/Crypted virus creates bogus svchost.exe in temp directory franklinhu@yahoo.com Anti-Virus 2 28th Nov 2006 10:51 AM
How do I sort with empty rows between none empty rows? =?Utf-8?B?RXhjZWwgQ2hhbGxlbmdlZA==?= Microsoft Excel Worksheet Functions 1 17th Aug 2006 03:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:01 PM.