使用DevExpress GridView 控件,界面出现问题

canserly 2008-04-02 04:46:33
有时界面打开后发现GridView控件边成了一个巨大的红叉,请问是什么问题如何解决?
PS:数据源中所有列都是字符串类型,不存在数据类型不匹配

DevExpress的版本是Inc.NET.2005 2.2.0
...全文
1145 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Michael_6088 2012-06-27
  • 打赏
  • 举报
回复
Ding
zhangxingkl789 2010-03-12
  • 打赏
  • 举报
回复



DevExpress学习交流(C#、ASP.NET)

总群:82306553 状态:已满
二群:90957405 状态:已满
三群:88170049 状态:热招

ggarp 2009-07-13
  • 打赏
  • 举报
回复
..........
lengxue79 2008-09-01
  • 打赏
  • 举报
回复
我也遇到,程序本身好象没有什么大问题,就是在加载完数据显示的时候,显示一个大红叉,提示:
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.UpdateCellAppearance(GridCellInfo cell, Boolean always)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.UpdateCellAppearance(GridCellInfo cell)
在 DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawRegularRowCell(GridViewDrawArgs e, GridCellInfo ci)
在 DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawRegularRow(GridViewDrawArgs e, GridDataRowInfo ri)
在 DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawRow(GridViewDrawArgs e, GridRowInfo ri)
在 DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawRows(GridViewDrawArgs e)
在 DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.DrawContents(GridViewDrawArgs e)
在 DevExpress.XtraGrid.Views.Grid.Drawing.GridPainter.Draw(ViewDrawArgs ee)
在 DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
在 DevExpress.XtraGrid.GridControl.OnPaint(PaintEventArgs e)
在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
在 System.Windows.Forms.Control.WmPaint(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
在 DevExpress.XtraGrid.GridControl.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RV.AQQIS.AGMMIS.OnlineWeight
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/RV.AQQIS.AGMMIS.OnlineWeight.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Data
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.OracleClient
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data.OracleClient/2.0.0.0__b77a5c561934e089/System.Data.OracleClient.dll
----------------------------------------
System.Transactions
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
RV.AQQIS.DataAccess
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/RV.AQQIS.DataAccess.DLL
----------------------------------------
System.Data.OracleClient.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Data.OracleClient.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Data.OracleClient.resources.dll
----------------------------------------
System.EnterpriseServices
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
RV.AQQIS.Common
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/RV.AQQIS.Common.DLL
----------------------------------------
RV.AQQIS.AGEntity
程序集版本: 1.0.2.2
Win32 版本: 1.0.2.2
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/RV.AQQIS.AGEntity.DLL
----------------------------------------
DevExpress.XtraGrid.v7.1
程序集版本: 7.1.1.0
Win32 版本: 7.1.1.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/DevExpress.XtraGrid.v7.1.DLL
----------------------------------------
DevExpress.XtraEditors.v7.1
程序集版本: 7.1.1.0
Win32 版本: 7.1.1.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/DevExpress.XtraEditors.v7.1.DLL
----------------------------------------
DevExpress.Utils.v7.1
程序集版本: 7.1.1.0
Win32 版本: 7.1.1.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/DevExpress.Utils.v7.1.DLL
----------------------------------------
DevExpress.Data.v7.1
程序集版本: 7.1.1.0
Win32 版本: 7.1.1.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/DevExpress.Data.v7.1.DLL
----------------------------------------
RV.SJCJ2005
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/RV.SJCJ2005.DLL
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
XtraDataTempAssembly
程序集版本: 0.0.0.0
Win32 版本: 7.1.1.0
基本代码: file:///D:/Online(260)V2.0(修改不挂事务)/RV.AQQIS.AGMMIS.OnlineWeight/bin/Debug/DevExpress.Data.v7.1.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.42 (RTM.050727-4200)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。

正在郁闷中.............
canserly 2008-04-08
  • 打赏
  • 举报
回复
错误信息如下,请问如何解决
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.IndexOutOfRangeException: 索引 2 不是为负数,就是大于行数。
在 System.Data.DataView.GetElement(Int32 index)
在 System.Data.DataView.System.Collections.IList.get_Item(Int32 recordIndex)
在 System.Windows.Forms.BindingSource.get_Item(Int32 index)
在 DevExpress.Data.Helpers.BaseListDataControllerHelper.GetRow(Int32
listSourceRow)
在 DevExpress.Data.Helpers.BaseDataControllerHelper.GetRowKey(Int32
listSourceRow)
在 DevExpress.Data.DataController.GetRowKey(Int32 controllerRow)
在 DevExpress.XtraGrid.Views.Base.ColumnView.GetRowKey(Int32 rowHandle)

DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.LoadRows(GridRowsLoadInfo
e)
在 DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.Calc(Graphics g,
Rectangle bounds)
在 DevExpress.XtraGrid.Views.Grid.GridView.DoInternalLayout()
在 DevExpress.XtraGrid.Views.Grid.GridView.CalculateLayout()
在 DevExpress.XtraGrid.Views.Base.BaseView.CalculateLayoutSynchronized()
在 DevExpress.XtraGrid.Views.Base.BaseView.CheckViewInfo()

DevExpress.XtraGrid.Views.Grid.Handler.GridNewRowNavigator.OnKeyDown(KeyEventArgs
e)
在 DevExpress.XtraGrid.Views.Grid.Handler.GridHandler.OnKeyDown(KeyEventArgs
e)

DevExpress.XtraGrid.Views.Grid.Handler.GridHandler.ProcessKey(KeyEventArgs e)
在 DevExpress.Utils.Controls.BaseHandler.ProcessEvent(EventType etype,
Object args)

DevExpress.XtraGrid.Views.Base.Handler.BaseViewHandler.ProcessEvent(EventType
etype, Object args)
在 DevExpress.XtraGrid.GridControl.RaiseEditorKeyDown(KeyEventArgs e)

DevExpress.XtraEditors.Container.EditorContainer.DevExpress.XtraEditors.Container.IEditorContainer.OnEditorKeyDown(KeyEventArgs
e)
在 DevExpress.XtraEditors.TextEdit.OnEditorKeyDown(KeyEventArgs e)
在 DevExpress.XtraEditors.PopupBaseEdit.OnEditorKeyDown(KeyEventArgs e)
在 DevExpress.XtraEditors.BaseEdit.OnKeyDown(KeyEventArgs e)
在 DevExpress.XtraEditors.ButtonEdit.OnKeyDown(KeyEventArgs e)
在 System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
在 System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
在 System.Windows.Forms.Control.WmKeyChar(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 DevExpress.XtraEditors.BaseControl.WndProc(Message& m)
在 DevExpress.XtraEditors.TextEdit.WndProc(Message& msg)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
csharp_start 2008-04-04
  • 打赏
  • 举报
回复
先设置datasource = null;
然后设置datasource = datatable;
canserly 2008-04-04
  • 打赏
  • 举报
回复
我说的是程序执行的时候,不是在敲代码的时候.编译的时候当然没有任何问题,可使用的时候偶尔会出现问题.
hy_lihuan 2008-04-02
  • 打赏
  • 举报
回复
编译成功,使用正常的话就不影响使用的
  • 打赏
  • 举报
回复
Ding!

111,095

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧