有一个按钮"查询"一个 gridcontrol 显示数据 焦点到 "查询" 上按 回车 不送开出了异常--- A
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 DevExpress.Data.VisibleListSourceRowCollection.get_Count()
at DevExpress.Data.DataController.get_VisibleListSourceRowCount()
at DevExpress.Data.DataController.IsControllerRowValid(Int32 controllerRow)
at DevExpress.Data.CurrencyDataController.IsControllerRowValid(Int32 controllerRow)
at DevExpress.Data.DataController.IsControllerCellValid(Int32 controllerRow, Int32 column)
at DevExpress.Data.DataController.GetRowValue(Int32 controllerRow, Int32 column, OperationCompleted[] completed)
at DevExpress.Data.BaseListSourceDataController.GetRowValue(Int32 controllerRow, Int32 column, OperationCompleted[] completed)
at DevExpress.XtraGrid.Views.Base.ColumnView.GetRowCellValue(Int32 rowHandle, GridColumn column)
at DevExpress.XtraGrid.Views.Grid.GridView.GetRowCellValue(Int32 rowHandle, GridColumn column)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcRowCellDrawInfo(GridDataRowInfo ri, GridColumnInfoArgs ci, GridCellInfo cell, GridColumnInfoArgs nextColumn, Boolean calcEditInfo)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcRowCellsDrawInfo(GridDataRowInfo ri, GridColumnsInfo columnsInfo)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcDataRow(GridDataRowInfo ri, GridRow row, GridRow nextRow)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcRowsDrawInfo()
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcGridInfo()
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.Calc(Graphics g, Rectangle bounds)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.FullRecalcScroll(Graphics g, Rectangle bounds)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcAfterVertScrollCore(Graphics g, Rectangle bounds, Boolean useCache)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcAfterVertScroll(Graphics g, Rectangle bounds, Boolean useCache)
at DevExpress.XtraGrid.Views.Grid.GridView.RefreshRows(Boolean useCache, Boolean afterScroll)
at DevExpress.XtraGrid.Views.Grid.GridView.CalculateDataCore()
at DevExpress.XtraGrid.Views.Grid.GridView.CalculateData()
at DevExpress.XtraGrid.Views.Base.BaseView.CheckViewInfo()
at DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
at DevExpress.XtraGrid.GridControl.OnPaint(PaintEventArgs e)
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 DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
at DevExpress.XtraGrid.GridControl.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.3623 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
-- B
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 DevExpress.Skins.SkinElementPainter.DrawImageStretch(SkinElementInfo info, Image image, Rectangle imageBounds, Rectangle screenBounds)
at DevExpress.Skins.SkinElementPainter.DrawImage(SkinElementInfo info, Image image, Rectangle imageBounds, Rectangle screenBounds, SkinImageStretch stretch)
at DevExpress.Skins.SkinElementPainter.DrawImageStretchTile(SkinElementInfo info, SkinPaddingEdges paddingEdgesData, Image image, Rectangle imageBounds, Rectangle destBounds, SkinImageStretch stretch)
at DevExpress.Skins.SkinElementPainter.DrawSkinImage(SkinElementInfo elementInfo, SkinImage skinImage)
at DevExpress.Skins.SkinElementPainter.DrawObject(ObjectInfoArgs e)
at DevExpress.Utils.Drawing.ObjectPainter.DrawObject(GraphicsCache cache, ObjectPainter painter, ObjectInfoArgs e)
at DevExpress.Utils.Drawing.RotateObjectPaintHelper.DrawRotated(GraphicsCache cache, ObjectInfoArgs info, ObjectPainter painter, RotateFlipType rotate, Boolean alwaysCreate)
at DevExpress.Utils.Drawing.RotateObjectPaintHelper.DrawRotated(GraphicsCache cache, ObjectInfoArgs info, ObjectPainter painter, RotateFlipType rotate)
at DevExpress.XtraEditors.Drawing.EditorButtonPainter.DrawButton(ObjectInfoArgs e)
at DevExpress.XtraEditors.Drawing.EditorButtonPainter.DrawObject(ObjectInfoArgs e)
at DevExpress.XtraEditors.Drawing.SkinEditorButtonPainter.DrawObject(ObjectInfoArgs e)
at DevExpress.XtraEditors.Drawing.ButtonEditPainter.DrawButton(ButtonEditViewInfo viewInfo, EditorButtonObjectInfoArgs info)
at DevExpress.XtraEditors.Drawing.ButtonEditPainter.DrawButtons(ControlGraphicsInfoArgs info, EditorButtonObjectCollection collection, Boolean drawNormalDisabled)
at DevExpress.XtraEditors.Drawing.ButtonEditPainter.DrawButtons(ControlGraphicsInfoArgs info)
at DevExpress.XtraEditors.Drawing.ButtonEditPainter.DrawContent(ControlGraphicsInfoArgs info)
at DevExpress.XtraEditors.Drawing.BaseControlPainter.Draw(ControlGraphicsInfoArgs info)
at DevExpress.XtraEditors.Drawing.BaseEditPainter.Draw(ControlGraphicsInfoArgs info)
at DevExpress.XtraEditors.BaseControl.OnPaint(PaintEventArgs e)
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 DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
at DevExpress.XtraEditors.TextEdit.WndProc(Message& msg)
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.3623 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
-- B
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 DevExpress.Data.GroupRowInfoCollection.GetGroupRowInfoByControllerRowHandle(Int32 controllerRowHandle)
at DevExpress.Data.DataController.IsRowExpanded(Int32 groupRowHandle)
at DevExpress.XtraGrid.Views.Grid.GridView.GetRowExpanded(Int32 rowHandle)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.GetRowFooterCount(Int32 rowHandle, Int32 rowVisibleIndex)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.GetTotalFooterRowHeight(Int32 rowHandle, Int32 rowVisibleIndex)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcTotalRowHeight(Graphics g, Int32 rowHandle, Int32 rowVisibleIndex, Int32 level)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.LoadRowsCore(GridRowsLoadInfo e)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.LoadRows(GridRowsLoadInfo e)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcAfterVertScrollCore(Graphics g, Rectangle bounds, Boolean useCache)
at DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo.CalcAfterVertScroll(Graphics g, Rectangle bounds, Boolean useCache)
at DevExpress.XtraGrid.Views.Grid.GridView.RefreshRows(Boolean useCache, Boolean afterScroll)
at DevExpress.XtraGrid.Views.Grid.GridView.CalculateDataCore()
at DevExpress.XtraGrid.Views.Grid.GridView.CalculateData()
at DevExpress.XtraGrid.Views.Base.BaseView.CheckViewInfo()
at DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
at DevExpress.XtraGrid.GridControl.OnPaint(PaintEventArgs e)
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 DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
at DevExpress.XtraGrid.GridControl.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.3623 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------请教高手解释下
解决方案 »
- 关于lock的一点疑问
- 用gdi+ 画了图,怎么在在图上做一个实时移动的垂直线
- 水晶报表从来没做过,给我看下
- 是个关于WEB实现数据邦定树形控件的问题!希望有好心人赐教!
- 向QQ那样的打开多个聊天窗口是如何区分的?
- 当dataGrid移动到新的一行用什么事件?
- C# 怎样对dataGridView中已经选中过的行进行标记
- 如何编写自定义的控件???
- C:\Documents and Settings\Administrator\桌面\svc030401\Form1.cs(7): 类型或命名空间名称“WinForms”在类或命名空间“System”中不存
- 如何打印DataGrid中的内容啊?
- DropdownList无法赋值
- 如何批量修改DataSet里面某一列的值(仅仅只是修改DataSet,不保存进数据库)
用别人的 不知道 出问题的原因很正常你去 democenter去看官方怎么用的
NullReferenceException
未将对象应用到实例错误
你代码的问题 和控件沒关系吧