i application exception
@ system.windows.forms.currencymanager.get_item(int32 index) @ system.windows.forms.currencymanager.get_current() @ system.windows.forms.datagridview.datagridviewdataconnection.onrowenter(datagridviewcelleventargs e) @ system.windows.forms.datagridview.onrowenter(datagridviewcell& datagridviewcell, int32 columnindex, int32 rowindex, boolean cancreatenewrow, boolean validationfailureoccurred) @ system.windows.forms.datagridview.setcurrentcelladdresscore(int32 columnindex, int32 rowindex, boolean setanchorcelladdress, boolean validatecurrentcell, boolean throughmouseclick) @ system.windows.forms.datagridview.oncellmousedown(hittestinfo hti, boolean isshiftdown, boolean iscontroldown) @ system.windows.forms.datagridview.oncellmousedown(datagridviewcellmouseeventargs e) @ system.windows.forms.datagridview.onmousedown(mouseeventargs e) @ system.windows.forms.control.wmmousedown(message& m, mousebuttons button, int32 clicks) @ system.windows.forms.control.wndproc(message& m) @ system.windows.forms.datagridview.wndproc(message& m) @ system.windows.forms.control.controlnativewindow.onmessage(message& m) @ system.windows.forms.control.controlnativewindow.wndproc(message& m) @ system.windows.forms.nativewindow.debuggablecallback(intptr hwnd, int32 msg, intptr wparam, intptr lparam) @ system.windows.forms.unsafenativemethods.dispatchmessagew(msg& msg) @ system.windows.forms.application.componentmanager.system.windows.forms.unsafenativemethods.imsocomponentmanager.fpushmessageloop(intptr dwcomponentid, int32 reason, int32 pvloopdata) @ system.windows.forms.application.threadcontext.runmessageloopinner(int32 reason, applicationcontext context) @ system.windows.forms.application.threadcontext.runmessageloop(int32 reason, applicationcontext context) @ system.windows.forms.application.run(form mainform) @ medforms.program.main() in f:\projects\vstu\medforms\medforms\program.cs:line 18 @ system.appdomain._nexecuteassembly(runtimeassembly assembly, string[] args) @ system.appdomain.executeassembly(string assemblyfile, evidence assemblysecurity, string[] args) @ microsoft.visualstudio.hostingprocess.hostproc.runusersassembly() @ system.threading.threadhelper.threadstart_context(object state) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean ignoresyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state) @ system.threading.threadhelper.threadstart()
each time when try click on datagridview.
i error message
{"index -1 not have value."} (systemindexoutofarange exception).
on row
application.run(new mainform());
and not able debug it. please me find can cause such problem , how can debug it?
i'm guessing have bound list empty, (or other sort of collection not generate list changed events) datagridview
, , added items list.
the items add display correctly on grid, clicking on row cause exception. because underlying currencymanager
reporting current row position offset of -1. stay way because list not report changes grid.
you should bind list grid if has items in begin with, or rebind when add them.
see answer this question, same problem.
Comments
Post a Comment