By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,528 Members | 929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,528 IT Pros & Developers. It's quick & easy.

DataGridView Error

P: n/a
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 my.
But an error has appeared me when in run time I sail in the DataGridView, as
I indicate next.

1. With the mouse I settle in the first cell of the Grid.
2. Low to the second row
3. I raise the first row
4. Low to the second row
5. I raise the first row
6. Low to the second row

When low to the second row (single I have two rows or registry for this one
moment) the error takes place that I copy at the end of this one message.

According to I understand of the error message, I have a proble with the
value that takes a called parameter RowIndex.

But, reviewing the single code the variable is modified once that goes like
parameter and the value that takes is been worth.

I placed breakpoint to make pursuit to the value and in fact single the
first time takes a value that change of row.

Somebody can help me with this one error.

Thanks to all for the lent attention and the contributed aid.
A warm greeting for all.
Kindly. -
Jorge Eastman

===== The message error
================================================== ==========================

It was not controlled System.ArgumentOutOfRangeException
Message="El argumento especificado está fuera del intervalo de valores
válidos.\r\nNombre del parámetro: rowIndex"
en System.Windows.Forms.DataGridView.GetCellDisplayRe ctangle(Int32
columnIndex, Int32 rowIndex, Boolean cutOverflow)
System.Windows.Forms.DataGridView.GetCellAdjustedD isplayRectangle(Int32
columnIndex, Int32 rowIndex, Boolean cutOverflow)
en System.Windows.Forms.DataGridView.InvalidateCellPr ivate(Int32
columnIndex, Int32 rowIndex)
en System.Windows.Forms.DataGridView.OnCellCommonChan ge(Int32
columnIndex, Int32 rowIndex)
System.Windows.Forms.DataGridView.DataGridViewData Connection.ProcessListChanged(ListChangedEventArgs
System.Windows.Forms.DataGridView.DataGridViewData Connection.currencyManager_ListChanged(Object
sender, ListChangedEventArgs e)
System.Windows.Forms.CurrencyManager.OnListChanged (ListChangedEventArgs e)
en System.Windows.Forms.CurrencyManager.CancelCurrent Edit()
System.Windows.Forms.DataGridView.DataGridViewData Connection.CancelRowEdit(Boolean
restoreRow, Boolean addNewFinished)
System.Windows.Forms.DataGridView.DataGridViewData Connection.OnRowValidating(DataGridViewCellCancelE ventArgs
System.Windows.Forms.DataGridView.OnRowValidating( DataGridViewCell&
dataGridViewCell, Int32 columnIndex, Int32 rowIndex)
en System.Windows.Forms.DataGridView.CommitEditForOpe ration(Int32
columnIndex, Int32 rowIndex, Boolean forCurrentCellChange)
en System.Windows.Forms.DataGridView.ScrollIntoView(I nt32
columnIndex, Int32 rowIndex, Boolean forCurrentCellChange)
en System.Windows.Forms.DataGridView.ProcessUpKey(Key s keyData)
System.Windows.Forms.DataGridView.ProcessDataGridV iewKey(KeyEventArgs e)
en System.Windows.Forms.DataGridView.OnKeyDown(KeyEve ntArgs e)
en System.Windows.Forms.Control.ProcessKeyEventArgs(M essage& m)
en System.Windows.Forms.DataGridView.ProcessKeyEventA rgs(Message& m)
en System.Windows.Forms.Control.ProcessKeyMessage(Mes sage& m)
en System.Windows.Forms.Control.WmKeyChar(Message& m)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.DataGridView.WndProc(Message& m)
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message&
en System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG&
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason,
ApplicationContext context)
en System.Windows.Forms.Application.Run(Form mainForm)
en jeastman.bancos.Program.Main() en
D:\mnt\Sistemas\jeastman\bancos\cliente\Program.cs :línea 22
en System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
en Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
en System.Threading.ThreadHelper.ThreadStart_Context( Object state)
en System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
en System.Threading.ThreadHelper.ThreadStart()

================================================== ================================================== ==============
Sep 21 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.