Windows Develop Bookmark and Share   
 index > Windows Forms General > Data Grid View ArgumentOutOfRangeException
 

Data Grid View ArgumentOutOfRangeException

Hi,

I'm having a problem with my DataGrid View. I have an array of objects that is returned as part of a search. I iterate through part of that array, pulling names, titles, etc. out of the search results and putting them onto the DataView. For each object I put to the DataView, I make a new row and add the data. Here's where the problem arises.

If you look at screenshot 1 (http://garyoak.com/images/errors/screenshot1.gif) you cna see my scroll bar has ended, but there are more results past the scroll bar. The scroll bar will not move past this point, but by using the down arrow, you can move further along the list (see screenshot 2 http://garyoak.com/images/errors/screenshot2.gif)). If you scroll to far down, the program throws the exception shown in screenshot 3 (http://garyoak.com/images/errors/screenshot3.gif). A more detailed look is in screenshot4 (http://garyoak.com/images/errors/screenshot4.gif). Does anyone have any idea what would be causing this? The really weird part is that if I hit one of the column headers to sort by that column (i.e. Index), the scroll bar is set properly and i can freely scroll all the rows (see screenshot5 (http://garyoak.com/images/errors/screenshot5.gif))

It looks like it's a problem with the scroll bar

If someone has an idea what's going wrong and can help me, I'd greatly appreciate it.
Gary Oak  Tuesday, September 08, 2009 6:47 PM

Hi,

The error shows �336�is out of range. I also create 6500 rows on my side. It didn’t throw this error. Could you please provide us how to reproduce this issue? You can also make a demo. Please upload your demo project to some server and offer us the URL. Skydrive (http://skydrive.live.com/ ) may be a good option. You can sign up 25GB free space only with your Windows Live Passport.

Best regards,

Ling Wang


Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Ling Wang  Tuesday, September 15, 2009 12:06 PM

We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.


Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Ling Wang  Sunday, September 20, 2009 3:10 PM

You can use google to search for other answers

Custom Search

More Threads

• Exception when TablePanelLayout.GetControlFromPosition is called
• How Can I get the icon for the microsoft Applications
• Column cannot be added because its CellType property is null
• System.IO.FileNotFoundException In Windows Application
• Preview of files from within a form (.net, windows xp)
• How to resize button to follow Text at runtime?
• Tabs - shortcut
• inserting values into details form
• Font style not found issue/exception -- how can apps work with this problem?
• New to .NET and UIP Application Block