PC Review


Reply
Thread Tools Rate Thread

DataView.AddNew for child table Causes index out of bounds

 
 
Lee Gillie
Guest
Posts: n/a
 
      21st Jun 2005
I've bound the data grid (windows forms) to two related tables, at the
top Clients, and below the Jobs for that client. Most works well except
if one deletes all jobs for a given client, and then goes to add a new
one. The DataView.AddNew causes an index out of bounds exception. It
would appear from the stack that the grid is attempting to paint row #0,
which of course does not exist yet (not until I finish filling out the
DataRowView, and call drv.EndEdit).

I have tried suspending layout during the add, but no help.

I unbound and attempted to rebind after the add, which avoids the
exception, but once I rebind I am not able to see how to navigate back
to the newly created row in the child table. I end up at the job for the
first client. I don't see how to tell what row # to use to get to the
newly added job.

Banging my head on the wall until bloody. Googling until my fingers are
raw. I see others reporting problems such as this, but no one seems to
know the answer.
 
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
DataView.AddNew for child table Causes index out of bounds Lee Gillie Microsoft Dot NET Framework Forms 0 21st Jun 2005 09:07 PM
DataView RowFilter: Index was outside the bounds of the array. =?Utf-8?B?aUNlQ0xvVw==?= Microsoft C# .NET 1 11th Oct 2004 08:04 AM
DataView.AddNew and DataView.Count =?Utf-8?B?c3VidA==?= Microsoft ADO .NET 5 21st Mar 2004 05:51 AM
Parent/child table addnew() problem in BindingContext. Help Kevin Microsoft ADO .NET 0 2nd Feb 2004 11:41 PM
Child Table DataView.AllowNew problem Juergen Bronn Microsoft Dot NET Framework Forms 0 23rd Jul 2003 07:28 PM


Features
 

Advertising
 

Newsgroups
 


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