listView 显示数十万数据问题
显示几万数据一般不会出问题,但显示10多万时就会报一下错误
还有就是不加载图片,显示10多万数据也不出错,是内存问题还是???希望高手能解答..............我的内存是2G的
System.ArgumentException: Invalid parameter used.
at System.Drawing.Graphics.GetHdc()
at System.Windows.Forms.ControlPaint.DrawFrameControl(Graphics graphics, Int32 x, Int32 y, Int32 width, Int32 height, Int32 kind, Int32 state)
at System.Windows.Forms.ControlPaint.DrawCheckBox(Graphics graphics, Int32 x, Int32 y, Int32 width, Int32 height, ButtonState state)
at System.Windows.Forms.ControlPaint.DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state)
at System.Windows.Forms.CheckBox.DrawCheckBox(PaintEventArgs e, LayoutData layout)
at System.Windows.Forms.CheckBox.PaintUp(PaintEventArgs e, CheckState state)
at System.Windows.Forms.ButtonBase.PaintStandard(PaintEventArgs pevent)
at System.Windows.Forms.ButtonBase.PaintControl(PaintEventArgs pevent)
at System.Windows.Forms.ButtonBase.OnPaint(PaintEventArgs pevent)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.CoThe program '[592] FileSearch.exe ' has exited with code 0 (0x0).
ntrol.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at FileSearch.Form1.Main()
------解决方案--------------------lz:没有必要一次就把十万条数据读进去啊,分页分批,你的问题很快可以跟踪出来。。。
------解决方案--------------------读那么多数据 进去做什么
人都看不完
看到那里 取到那里
分页数据啊
------解决方案--------------------没有这样必要吧???
一次读这么多?并不是每个用户的内存都是1G以上的
------解决方案--------------------还是分页来读吧,在数据库区找个邹建的分面存储过程.