Jeff,
>Here's the stack trace from the Call Stack window. The Output window displays
>
>A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll
>
>This does not throw an exception up to the application, as I guess it's handled. The problem is that immediately after I add a new row, when the I use the NavigateData() method to go to the mmNavigate.Last position, the current row does not change. When I look at
>bizObj.GetRowCount(ds.Tables[dataTableName].DefaultView), the count includes the new record.
>
>
>It looks like the error is actually generated in on line 313
> bindingContext[dv].Position = dv.Count - 1;
>with dv.Count = 3. When this line is executed, the exception appears in the Output window and bindingContext[dv].Position remains 0.
That *is* unusual. So, if you don't bind the DateTimePicker, but have other controls bound to the DefaultView it works fine? Do you have a default Date/Time value in the new record? I wonder if it's choking on a null date.
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com