unhandled exception has occurred in your application if you click continue the application will bla bla bla ........and suggest me to insert JIT Compiler inside *.config file i tried this but also i'm getting same error....plz help me to find the solution.
UPDATE: Code from comments:
public void datagridbind()
{
dt = new DataTable();
dt.Columns.Add("Column1", typeof(string));
dt.Columns.Add("Column2", typeof(string));
dt.Columns.Add("Column3", typeof(string));
dt.Columns.Add("Column12", typeof(string));
dt.Columns.Add("Column13", typeof(string));
dt.Columns.Add("Column4", typeof(string));
dt.Columns.Add("Column5", typeof(string));
dt.Columns.Add("Column6", typeof(string));
dt.Columns.Add("Column7", typeof(string));
dt.Columns.Add("Column8", typeof(string));
dt.Columns.Add("Column9", typeof(string));
dt.Columns.Add("Column10", typeof(string));
dt.Columns.Add("Column11", typeof(string));
this.dgvMulti.Columns["Column1"].DataPropertyName = "Column1";
this.dgvMulti.Columns["Column2"].DataPropertyName = "Column2";
this.dgvMulti.Columns["Column3"].DataPropertyName = "Column3";
this.dgvMulti.Columns["Column12"].DataPropertyName = "Column12";
this.dgvMulti.Columns["Column13"].DataPropertyName = "Column13";
this.dgvMulti.Columns["Column4"].DataPropertyName = "Column4";
this.dgvMulti.Columns["Column5"].DataPropertyName = "Column5";
this.dgvMulti.Columns["Column6"].DataPropertyName = "Column6";
this.dgvMulti.Columns["Column7"].DataPropertyName = "Column7";
this.dgvMulti.Columns["Column8"].DataPropertyName = "Column8";
this.dgvMulti.Columns["Column9"].DataPropertyName = "Column9";
this.dgvMulti.Columns["Column10"].DataPropertyName = "Column10";
this.dgvMulti.Columns["Column11"].DataPropertyName = "Column11";
this.dgvMulti.Columns["SerNo"].Width = 50;
this.dgvMulti.Columns["Column1"].Width = 150;
dgvMulti.DataSource = dt;
dt.Clear();
}
and this was the error
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at HMS.frmRepairReplacementDockedId.datagridbind()
at HMS.frmRepairReplacementDockedId.frmRepairReplacementDockedId_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
HMS
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PhoenixTechnologies/ComputerShoppe/HMS.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
BusinessLayer
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PhoenixTechnologies/ComputerShoppe/BusinessLayer.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
DllSign
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PhoenixTechnologies/ComputerShoppe/DllSign.DLL
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
DataAccessLayer
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PhoenixTechnologies/ComputerShoppe/DataAccessLayer.DLL
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.6.7.0 built by: NETFXREL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
EntityLayer
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/PhoenixTechnologies/ComputerShoppe/EntityLayer.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (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">
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.