关于 DevExpress 控件问题
有一个按钮"查询"
一个 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
----------------------------------------
请教高手解释下