I
Ivan
HI ALL,
I 'm having 2 questions need to figure out urgently. Please give me some advices or answer with some sample code if anyone know why it happens or how to fix it. Thanks~
Question 1:
How to handle the event if user click on the datagrid row header (select the whole row) and press DELETE button.. it supposes to delete the selected row.. it looks just fine on the interface but after i save and update the source. It doesn't make any change indeed...
Question 2:
This error happens when i add a new record in a datagrid... usually the grid will automatically add a new row with all (null) in each cell ... but then ... if i leave the datagrid (click to other controls on the same form) when focusing on the new row.. it will cause the following error.... Does anyone know why this error happen???....
For more information... it only happens to 2 (the most complicated one) out of 5 datagrid in the same form...
Thanks,
IVAN
FYI: Question 2
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: No value at index 1.
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.DataGridRow.PaintHeader(Graphics g, Rectangle visualBounds, Boolean alignToRight, Boolean rowIsDirty)
at System.Windows.Forms.DataGridRelationshipRow.PaintHeaderInside(Graphics g, Rectangle bounds, Brush backBr, Boolean alignToRight, Boolean isDirty)
at System.Windows.Forms.DataGridRelationshipRow.PaintHeader(Graphics g, Rectangle bounds, Boolean alignToRight, Boolean isDirty)
at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
----------------------------------------
MirAppMM
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/MirAppMM.exe
----------------------------------------
Mirabell.SystemModule
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.SystemModule.DLL
----------------------------------------
Mirabell.ClassBase
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.ClassBase.DLL
----------------------------------------
Mirabell.FormBase
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.FormBase.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
----------------------------------------
Mirabell.SystemMessage
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.SystemMessage.DLL
----------------------------------------
System.Runtime.Remoting
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.runtime.remoting/1.0.3300.0__b77a5c561934e089/system.runtime.remoting.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9502
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.3300.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
Mirabell.Global
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Global.DLL
----------------------------------------
Mirabell.Types
Assembly Version: 1.0.1384.22553
Win32 Version: 1.0.1384.22553
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Types.DLL
----------------------------------------
Mirabell.SystemUI
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.SystemUI.DLL
----------------------------------------
Mirabell.UIControls
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.UIControls.DLL
----------------------------------------
Mirabell.Database
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Database.DLL
----------------------------------------
Mirabell.WinAPI
Assembly Version: 1.0.1384.22554
Win32 Version: 1.0.1384.22554
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.WinAPI.DLL
----------------------------------------
Mirabell.Public
Assembly Version: 1.0.1384.22553
Win32 Version: 1.0.1384.22553
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Public.DLL
----------------------------------------
System.Data
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.3300.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.3300.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------
MirRetail.WHDNM
Assembly Version: 1.0.1384.28790
Win32 Version: 1.0.1384.28790
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/MirRetail.WHDNM.DLL
----------------------------------------
Mirabell.Retail
Assembly Version: 1.0.1384.22574
Win32 Version: 1.0.1384.22574
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Retail.DLL
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
I 'm having 2 questions need to figure out urgently. Please give me some advices or answer with some sample code if anyone know why it happens or how to fix it. Thanks~
Question 1:
How to handle the event if user click on the datagrid row header (select the whole row) and press DELETE button.. it supposes to delete the selected row.. it looks just fine on the interface but after i save and update the source. It doesn't make any change indeed...
Question 2:
This error happens when i add a new record in a datagrid... usually the grid will automatically add a new row with all (null) in each cell ... but then ... if i leave the datagrid (click to other controls on the same form) when focusing on the new row.. it will cause the following error.... Does anyone know why this error happen???....
For more information... it only happens to 2 (the most complicated one) out of 5 datagrid in the same form...
Thanks,
IVAN
FYI: Question 2
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: No value at index 1.
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.DataGridRow.PaintHeader(Graphics g, Rectangle visualBounds, Boolean alignToRight, Boolean rowIsDirty)
at System.Windows.Forms.DataGridRelationshipRow.PaintHeaderInside(Graphics g, Rectangle bounds, Brush backBr, Boolean alignToRight, Boolean isDirty)
at System.Windows.Forms.DataGridRelationshipRow.PaintHeader(Graphics g, Rectangle bounds, Boolean alignToRight, Boolean isDirty)
at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
----------------------------------------
MirAppMM
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/MirAppMM.exe
----------------------------------------
Mirabell.SystemModule
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.SystemModule.DLL
----------------------------------------
Mirabell.ClassBase
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.ClassBase.DLL
----------------------------------------
Mirabell.FormBase
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.FormBase.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.dll
----------------------------------------
Mirabell.SystemMessage
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.SystemMessage.DLL
----------------------------------------
System.Runtime.Remoting
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.runtime.remoting/1.0.3300.0__b77a5c561934e089/system.runtime.remoting.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.3300.0
Win32 Version: 7.00.9502
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.3300.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
Mirabell.Global
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Global.DLL
----------------------------------------
Mirabell.Types
Assembly Version: 1.0.1384.22553
Win32 Version: 1.0.1384.22553
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Types.DLL
----------------------------------------
Mirabell.SystemUI
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.SystemUI.DLL
----------------------------------------
Mirabell.UIControls
Assembly Version: 1.0.1384.22572
Win32 Version: 1.0.1384.22572
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.UIControls.DLL
----------------------------------------
Mirabell.Database
Assembly Version: 1.0.1384.22571
Win32 Version: 1.0.1384.22571
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Database.DLL
----------------------------------------
Mirabell.WinAPI
Assembly Version: 1.0.1384.22554
Win32 Version: 1.0.1384.22554
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.WinAPI.DLL
----------------------------------------
Mirabell.Public
Assembly Version: 1.0.1384.22553
Win32 Version: 1.0.1384.22553
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Public.DLL
----------------------------------------
System.Data
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.3300.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.3300.0
Win32 Version: 1.0.3705.288
CodeBase: file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.3300.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------
MirRetail.WHDNM
Assembly Version: 1.0.1384.28790
Win32 Version: 1.0.1384.28790
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/MirRetail.WHDNM.DLL
----------------------------------------
Mirabell.Retail
Assembly Version: 1.0.1384.22574
Win32 Version: 1.0.1384.22574
CodeBase: file:///C:/MirabellApp/MirAppMM/bin/Mirabell.Retail.DLL
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.