开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 2720|回复: 0

TileView 发生集合已修改;可能无法执行枚举操作

[复制链接]

0

精华

10

贡献

355

赞扬

正版授权组

Rank: 14Rank: 14Rank: 14Rank: 14

帖子
46
软币
740
在线时间
48 小时
注册时间
2015-7-10
发表于 2015-7-23 14:15:42 | 显示全部楼层 |阅读模式
本帖最后由 slcands 于 2015-7-23 14:16 编辑

我把TileView与一个DataTable绑定,在另一个线程中修改DataTable,结果发生错误:发生集合已修改;可能无法执行枚举操作
************** 异常文本 **************
System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
   在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   在 DevExpress.XtraEditors.TileControlPainter.DrawItemImage(TileControlInfoArgs e, TileItemViewInfo itemInfo)
   在 DevExpress.XtraEditors.TileControlPainter.DrawItem(TileControlInfoArgs e, TileItemViewInfo itemInfo)
   在 DevExpress.XtraEditors.TileControlPainter.DrawItems(TileControlInfoArgs e, TileGroupViewInfo groupInfo, Boolean groupDraw)
   在 DevExpress.XtraEditors.TileControlPainter.DrawGroup(TileControlInfoArgs e, TileGroupViewInfo groupInfo, Boolean groupDraw)
   在 DevExpress.XtraEditors.TileControlPainter.DrawGroups(TileControlInfoArgs e)
   在 DevExpress.XtraEditors.TileControlPainter.Draw(TileControlInfoArgs e)
   在 DevExpress.XtraGrid.Views.Tile.Drawing.TileViewPainter.Draw(ViewDrawArgs e)
   在 DevExpress.XtraGrid.Views.Base.BaseView.Draw(GraphicsCache e)
   在 DevExpress.XtraGrid.GridControl.OnPaint(PaintEventArgs e)
   在 DevExpress.Utils.Drawing.ControlPaintHelper.ProcessWMPaint(Message& m)
   在 DevExpress.XtraGrid.GridControl.CheckProcessMsg(Message& m)
   在 DevExpress.XtraGrid.GridControl.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

同样把此DataTable绑定到GridView就不会出现错误,请各位指定下~!


回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2024-5-19 02:01

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表