473,419 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

DataGridView Internal Error Beta 2.0

Anyone seen this? Know if its a bug? I'm pretty sure it is.

I have a DataGridView control in a tab control who's datasource is a
table in a dataset. In certain situations when I add a row to the
datasource table I get the following exception which seems to be a bad
reference inside the control itself.

Any ideas? Here's the exception:

Thanks.

Message: Object reference not set to an instance of an object.Stack: at
System.Windows.Forms.DataGridView.InvalidateScroll Bars() at
System.Windows.Forms.DataGridView.ResetUIState(Boo lean useRowShortcut,
Boolean computeVisibleRows) at
System.Windows.Forms.DataGridViewRowCollection.OnC ollectionChanged_PreNotification(CollectionChangeA ction
cca, Int32 rowIndex, Int32 rowCount, DataGridViewRow& dataGridViewRow,
Boolean changeIsInsertion) at
System.Windows.Forms.DataGridViewRowCollection.OnC ollectionChanged(CollectionChangeEventArgs
e, Int32 rowIndex, Int32 rowCount, Boolean changeIsDeletion, Boolean
changeIsInsertion, Boolean recreateNewRow, Point newCurrentCell) at
System.Windows.Forms.DataGridViewRowCollection.Ins ertInternal(Int32
rowIndex, DataGridViewRow dataGridViewRow, Boolean force) at
System.Windows.Forms.DataGridView.DataGridViewData Connection.ProcessListChanged(ListChangedEventArgs
e) at
System.Windows.Forms.DataGridView.DataGridViewData Connection.currencyManager_ListChanged(Object
sender, ListChangedEventArgs e) at
System.ComponentModel.ListChangedEventHandler.Invo ke(Object sender,
ListChangedEventArgs e) at
System.Windows.Forms.CurrencyManager.OnListChanged (ListChangedEventArgs
e) at System.Windows.Forms.CurrencyManager.List_ListChan ged(Object
sender, ListChangedEventArgs e) at
System.Windows.Forms.BindingSource.OnListChanged(L istChangedEventArgs
e) at System.Windows.Forms.BindingSource.InnerList_ListC hanged(Object
sender, ListChangedEventArgs e) at
System.Data.DataView.OnListChanged(ListChangedEven tArgs e) at
System.Data.DataView.IndexListChanged(Object sender,
ListChangedEventArgs e) at
System.Data.DataViewListener.IndexListChanged(Obje ct sender,
ListChangedEventArgs e) at
System.Data.Index.OnListChanged(ListChangedEventAr gs e) at
System.Data.Index.InsertRecord(Int32 record, Boolean fireEvent) at
System.Data.Index.ApplyChangeAction(Int32 record, Int32 action) at
System.Data.DataTable.RecordStateChanged(Int32 record1,
DataViewRowState oldState1, DataViewRowState newState1, Int32 record2,
DataViewRowState oldState2, DataViewRowState newState2) at
System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32
proposedRecord, DataRowAction action, Boolean isInMerge, Int32
position, Boolean fireEvent) at System.Data.DataTable.InsertRow(DataRow
row, Int32 proposedID, Int32 pos, Boolean fireEvent) at
System.Data.DataRowCollection.Add(DataRow row) at
Insurance.EmployeeFrm.NewDependant(Object sender,
LinkLabelLinkClickedEventArgs e) in C:\Documents and
Settings\csaloio\Desktop\Code\NET\Insurance\Insura nce\EmployeeFrm.cs:line
263 at
System.Windows.Forms.LinkLabel.OnLinkClicked(LinkL abelLinkClickedEventArgs
e) at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEven tArgs e) at
System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.Label.WndProc(Message& m) at
System.Windows.Forms.LinkLabel.WndProc(Message& msg) at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam) at
System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg) at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData) at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context) at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32
reason, ApplicationContext context) at
System.Windows.Forms.Application.Run(Form mainForm) at
Insurance.Program.Main() in C:\Documents and

Nov 17 '05 #1
0 1252

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ben Gracewood | last post by:
Hi I'm feeling like a total idiot at the moment. We're building an app in ..NET 2.0 beta 2, and no matter how hard I try, I can't get a DataGridView to accept ReadOnly = true on a cell or row....
16
by: pj | last post by:
(Was originally, probably wrongly, posted to the vc subgroup.) (This doesn't appear to be a c# problem, but a problem with a bug in the Visual Studio c# compiler, but, any help will be welcome...)...
0
by: LordHog | last post by:
Hello all, I am trying to implement an event handler for the KeyPress event for a cell within a DataGridView control. The obvous starting point from the DataGridView keypress event, but this...
10
by: steve | last post by:
Hi All I would like to be able to change the cell borders on certain cells to none at runtime to make a group of cells appear to be merged I have tried the following in the cellformatting...
3
by: PJ6 | last post by:
If I have a DataGridView in my form, when I click on the DataSource property, I get a message box displaying the exception message, "Object reference not set to instance of an object." What's...
3
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to add a datagridview control to a Windows Form to display read-only information in visual basic 2005. My understanding is that datareader will be faster for this purpose. I have the...
0
by: jeastman - Hotmail | last post by:
Hello world Excuse, not to be written English and it helps me with a translator. I am new programming in C#. I made a control inheriting the DataGridView to be able to add controls done by...
1
by: mtembene | last post by:
I have a windows form "BaseForm" that contains a DataGridView that is not bound to any datasources and a button. Both of these controls have a modifier of "Protected Internal" and none of the...
3
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.