Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Telerik.WinControl.UI.GridException错误_C#_Asp.net_.net_Winforms_Telerik - Fatal编程技术网

C# Telerik.WinControl.UI.GridException错误

C# Telerik.WinControl.UI.GridException错误,c#,asp.net,.net,winforms,telerik,C#,Asp.net,.net,Winforms,Telerik,我正在开发一个使用Telerik WinForms的WinForms应用程序。几个月前我接管了维护应用程序,现在我需要编辑一个使用这些表单的表单。但是每当我打开表单时,它就会给我这个错误。无论我是在测试服务器上还是在生产环境中尝试通过VisualStudio调试代码。每次都一样。尝试重新启动电脑,尝试重新安装Rad控件,Visual Studio。。。而且还是一样的。在另一台个人电脑上试用过,它在任何地方都有效——除了在我的个人电脑上。其他所有使用相同telerik gridview的形式都有效

我正在开发一个使用Telerik WinForms的WinForms应用程序。几个月前我接管了维护应用程序,现在我需要编辑一个使用这些表单的表单。但是每当我打开表单时,它就会给我这个错误。无论我是在测试服务器上还是在生产环境中尝试通过VisualStudio调试代码。每次都一样。尝试重新启动电脑,尝试重新安装Rad控件,Visual Studio。。。而且还是一样的。在另一台个人电脑上试用过,它在任何地方都有效——除了在我的个人电脑上。其他所有使用相同telerik gridview的形式都有效。现在我既不能使用也不能编辑表单。任何人都知道如何解决这个问题,可能是什么问题

PS:以下是整个错误日志:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Telerik.WinControls.UI.GridException: Cannot find column with UniqueName 'Product'
   at Telerik.WinControls.UI.GridViewColumnCollection.FindByUniqueName(String UniqueName)
   at Telerik.WinControls.UI.GridViewColumnCollection.get_Item(String name)
   at CustomerCare.Product.frmProducts.gvProducts_SizeChanged(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at Telerik.WinControls.RadControl.Telerik.WinControls.IComponentTreeHandler.CallSetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at Telerik.WinControls.ComponentLayoutElementTree.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at Telerik.WinControls.RadControl.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified)
   at Telerik.WinControls.RadControl.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.Control.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.Control.ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
   at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
   at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout)
   at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
   at CustomerCare.Product.frmProducts.InitializeComponent()
   at CustomerCare.Product.frmProducts..ctor()
   at CustomerCare.frmMain.vertMeni_ItemClicked(Object sender, ItemClickedEventArgs e)
   at vbAccelerator.Components.ListBarControl.ListBar.OnItemClicked(ItemClickedEventArgs e)
   at vbAccelerator.Components.ListBarControl.ListBar.MouseSelectItem(ListBarItem item, MouseEventArgs e)
   at vbAccelerator.Components.ListBarControl.ListBar.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   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.UserControl.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: 2.0.0.0
    Win32 Version: 2.0.50727.5477 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CustomerCare
    Assembly Version: 1.0.5302.15719
    Win32 Version: 1.0.5302.15719
    CodeBase: file:///C:/Program%20Files/MakTel/Customer%20Care/CustomerCare.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5459 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
acclListBar
    Assembly Version: 1.0.1326.27884
    Win32 Version: 1.0.1326.27884
    CodeBase: file:///C:/Program%20Files/MakTel/Customer%20Care/acclListBar.DLL
----------------------------------------
Interop.EnCodecDLL
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.0.0
    CodeBase: file:///C:/Program%20Files/MakTel/Customer%20Care/Interop.EnCodecDLL.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Telerik.WinControls.UI
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.0.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.UI/6.0.0.0__5bb2a467cbec794e/Telerik.WinControls.UI.dll
----------------------------------------
Telerik.WinControls
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.0.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls/6.0.0.0__5bb2a467cbec794e/Telerik.WinControls.dll
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Drawing.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
TelerikCommon
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.0.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/TelerikCommon/6.0.0.0__5bb2a467cbec794e/TelerikCommon.dll
----------------------------------------
Telerik.WinControls.GridView
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.0.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.GridView/6.0.0.0__5bb2a467cbec794e/Telerik.WinControls.GridView.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" />
</configuration>

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.

我可以编辑表单,但无法在生产中试用。任何人都能想到解决办法?我认为是windows问题或类似问题。

您应该尝试检查
设计模式
属性,并禁用由于各种事件处理程序而执行的代码


否则,请联系Telerik支持部门寻求帮助(或在其论坛上发布)。

您确定您的机器上有正确的dll吗?@FeliceM是的,我有。我认为这是与windows相关的问题。我直接在visual studio中删除了部分代码,并设法启动了表单。。。但无法用于生产。请指定应用程序使用的套件版本,并确认是否使用相同的版本。我写道,但目前为止运气不佳。。没有人回答。我尝试注释代码的一部分,并设法从Visual Studio以调试模式启动表单。。代码在上面的问题中。
private void gvProducts_SizeChanged(object sender, EventArgs e)
        {
            #region gvProducts_SizeChanged
            if (gvProducts.Size.Width > gvProductsSmallSize.Width)
            {
                gvProducts.MasterGridViewTemplate.Columns["Product"].Width = ((gvProducts.Size.Width - gvProductsSmallSize.Width) / 2) + 450;
                gvProducts.MasterGridViewTemplate.Columns["ProductGroupName"].Width = ((gvProducts.Size.Width - gvProductsSmallSize.Width) / 2) + 350;//this.Size.Width - frmProductSmallSize.Width + gvProducts.MasterGridViewTemplate.Columns["ProductGroupName"].Width;
            }
            else
            {
                gvProducts.MasterGridViewTemplate.Columns["Product"].Width = 450;
                gvProducts.MasterGridViewTemplate.Columns["ProductGroupName"].Width = 350;
                gvProducts.MasterGridViewTemplate.Columns["Status"].Width = 55;
            }
            #endregion
        }