Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Bug DataGridView: InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
 

Bug DataGridView: InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.

Hi,

The probelm in short: When minimizing then maximizing a Form with a DataGridView I get the the following error (InvalidArgument=Value of '0' is not valid for 'SelectedIndex'. Parameter Name: 'SelectedIndex')  I traced the problem to a similar bug with a DataGrid (ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.KB.v10.en/enu_kbnetframeworkkb/netframeworkkb/838087.htm).
I however cannot find any documentation if a similar bug exists for the DataGridView.

Does anyone know if this is a bug for the DataGridView, or of any documentation or workarounds for it?

Btw. Im using VS 2005 (release candidate 1)

Much appreciated!

chukky  Monday, November 14, 2005 7:19 AM

I have the same problem with windows ComboBox in C#.Net2. When I want to set the selectedIndex of the whole comboboxs on the form to zerothrough a foreach loop, I get that error message!

Thanks in advance for any help.

tintin1969  Friday, November 09, 2007 7:43 AM

You can use google to search for other answers

Custom Search

More Threads

• Listbox and a gridview
• Handling NoNullAllowedException
• single row
• Problem getting DataGridView cellpainting event to fire
• Databind Dataset to Label Control
• Windows Server 2000 and webbrowser control not rendering text
• list box problem
• Bind file to Grid
• Object reference not set to an instance of an object.
• Bindingsource.Filter Problem