Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

DataGridView mi nekada sruši aplikaciju kada kliknem na njega

[es] :: .NET :: DataGridView mi nekada sruši aplikaciju kada kliknem na njega

[ Pregleda: 2005 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Cola
Slađan Čolić
Banja Luka

Član broj: 23736
Poruke: 160
*.lanaco.com.

Sajt: www.knjigaimena.com


+5 Profil

icon DataGridView mi nekada sruši aplikaciju kada kliknem na njega14.08.2008. u 13:03 - pre 174 meseci
U C# sam na formu postavio DataGridView i sve lijepo radi osim na jednoj formi.
Kada u DataSource bindujem neku listu ispiše mi sve elemente te liste, međutim kada kliknem na taj DGV sruši mi se aplikacije.
Uspio sam samo u program.cs da uhvatim Exception sa porukom:

Message = "Index -1 does not have a value."

StackTrace =
"at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.CurrencyManager.get_Current()
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.OnRowEnter(DataGridViewCellEventArgs e)
at System.Windows.Forms.DataGridView.OnRowEnter(DataGridViewCell& dataGridViewCell, Int32 columnIndex, Int32 rowIndex, Boolean canCreateNewRow, Boolean validationFailureOccurred)
at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
at System.Windows.Forms.DataGridView.OnCellMouseDown(HitTestInfo hti, Boolean isShiftDown, Boolean isControlDown)
at System.Windows.Forms.DataGridView.OnCellMouseDown(DataGridViewCellMouseEventArgs e)
at System.Windows.Forms.DataGridView.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.DataGridView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
..."

Ovu grešku nikako ne mogu da provalim zbog čega se događa :( ako neko zna da mi pomogne

Hvala
 
Odgovor na temu

[es] :: .NET :: DataGridView mi nekada sruši aplikaciju kada kliknem na njega

[ Pregleda: 2005 | Odgovora: 0 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.