G
Guest
Hi,
When we are sorting the DataGrid Boolean column the grid is becoming
redcross.
I have my own PPMIPDataGridBoolColumn class inherited from
System.Windows.Forms.DataGridBoolColumn. In this inherited class I have one
DataGridValueChangedEventHandler event handler. I am overriding Edit() to
know the current state of the cell. I am overriding Paint() to know the if
the user has been editing the cell. I am also overriding the Commit() to
commit the cell's data in the underlying datasource.
In this whole scenario there is no problem if we donot sort the boolean
column and try to check and uncheck the checkboxes. When we sort the boolean
column and try to check the checkbox following is happening.
A dialogbox with caption Microsoft .Net Framework is coming with following
message with three buttons. "Details", "Continue" and "Quit"
**********************************************************
"An unhandled exception has occured in your application. If you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will be shut down immediately"
**********************************************************
Clicking on "Quit" button is quits the application
If I click on "Continue" button another messagebox is coming with caption
"Error when committing the row to the original data source."
and message
"Error in the application. Do you want to correct the value?"
Whatever button you choose to click i.e. 'Yes' or 'No' the messaagebox is
going away but the red cross exists.
I have no clue why this is happening? Please help me I am in deep trouble.
Clicking on "Details" button shows the error message in details which I am
pasting it below.
**********************************************************
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
PPMIP.Common.PPMIPException: Error in the application.
at PPMIP.Clients.OnlineForms.PPMIPDataGridBoolColumn.Paint(Graphics
vgraGraphic, Rectangle vrecBounds, CurrencyManager vcumSource, Int32
vintRowIndex, Brush vbruBack, Brush vruFore, Boolean vblnAlignToRight) in
c:\raj personal\ppmip\clients\onlineforms\ppmipdatagridboolcolumn.cs:line 311
at
System.Windows.Forms.DataGridRelationshipRow.PaintCellContents(Graphics g,
Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush
foreBrush, Boolean alignToRight)
at System.Windows.Forms.DataGridRow.PaintData(Graphics g, Rectangle
bounds, Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)
at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g,
Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32
numVisibleColumns, Boolean alignToRight)
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.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
PPMIP
Assembly Version: 1.0.8.0
Win32 Version: 1.0.8.0
CodeBase: file:///C:/Raj%20Personal/PPMIP/Bin/Debug/PPMIP.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dl
----------------------------------------
CommonClassCode
Assembly Version: 1.0.2032.24934
Win32 Version: 1.0.2032.24934
CodeBase: file:///C:/Raj%20Personal/PPMIP/Bin/Debug/CommonClassCode.DLL
----------------------------------------
PPMIP.Common.Resources
Assembly Version: 1.0.2032.23947
Win32 Version: 1.0.2032.23947
CodeBase:
file:///C:/Raj%20Personal/PPMIP/Bin/Debug/PPMIP.Common.Resources.DLL
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data.OracleClient
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data.oracleclient/1.0.5000.0__b77a5c561934e089/system.data.oracleclient.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.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.
**********************************************************
When we are sorting the DataGrid Boolean column the grid is becoming
redcross.
I have my own PPMIPDataGridBoolColumn class inherited from
System.Windows.Forms.DataGridBoolColumn. In this inherited class I have one
DataGridValueChangedEventHandler event handler. I am overriding Edit() to
know the current state of the cell. I am overriding Paint() to know the if
the user has been editing the cell. I am also overriding the Commit() to
commit the cell's data in the underlying datasource.
In this whole scenario there is no problem if we donot sort the boolean
column and try to check and uncheck the checkboxes. When we sort the boolean
column and try to check the checkbox following is happening.
A dialogbox with caption Microsoft .Net Framework is coming with following
message with three buttons. "Details", "Continue" and "Quit"
**********************************************************
"An unhandled exception has occured in your application. If you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will be shut down immediately"
**********************************************************
Clicking on "Quit" button is quits the application
If I click on "Continue" button another messagebox is coming with caption
"Error when committing the row to the original data source."
and message
"Error in the application. Do you want to correct the value?"
Whatever button you choose to click i.e. 'Yes' or 'No' the messaagebox is
going away but the red cross exists.
I have no clue why this is happening? Please help me I am in deep trouble.
Clicking on "Details" button shows the error message in details which I am
pasting it below.
**********************************************************
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
PPMIP.Common.PPMIPException: Error in the application.
at PPMIP.Clients.OnlineForms.PPMIPDataGridBoolColumn.Paint(Graphics
vgraGraphic, Rectangle vrecBounds, CurrencyManager vcumSource, Int32
vintRowIndex, Brush vbruBack, Brush vruFore, Boolean vblnAlignToRight) in
c:\raj personal\ppmip\clients\onlineforms\ppmipdatagridboolcolumn.cs:line 311
at
System.Windows.Forms.DataGridRelationshipRow.PaintCellContents(Graphics g,
Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush
foreBrush, Boolean alignToRight)
at System.Windows.Forms.DataGridRow.PaintData(Graphics g, Rectangle
bounds, Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)
at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g,
Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32
numVisibleColumns, Boolean alignToRight)
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.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
PPMIP
Assembly Version: 1.0.8.0
Win32 Version: 1.0.8.0
CodeBase: file:///C:/Raj%20Personal/PPMIP/Bin/Debug/PPMIP.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dl
----------------------------------------
CommonClassCode
Assembly Version: 1.0.2032.24934
Win32 Version: 1.0.2032.24934
CodeBase: file:///C:/Raj%20Personal/PPMIP/Bin/Debug/CommonClassCode.DLL
----------------------------------------
PPMIP.Common.Resources
Assembly Version: 1.0.2032.23947
Win32 Version: 1.0.2032.23947
CodeBase:
file:///C:/Raj%20Personal/PPMIP/Bin/Debug/PPMIP.Common.Resources.DLL
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data.OracleClient
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data.oracleclient/1.0.5000.0__b77a5c561934e089/system.data.oracleclient.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.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.
**********************************************************