引发的异常:“System.OutOfMemoryException”(位于 System.Windows.Forms.dll 中)
System.OutOfMemoryException: 引发类型为“System.OutOfMemoryException”的异常。
在 System.Windows.Forms.DataGridViewCell..ctor()
在 System.Windows.Forms.DataGridViewTextBoxCell.Clone()
在 System.Windows.Forms.DataGridViewRow.CloneCells(DataGridViewRow rowTemplate)
在 System.Windows.Forms.DataGridViewRow.Clone()
在 System.Windows.Forms.DataGridViewRowCollection.get_Item(Int32 index)
在 System.Windows.Forms.DataGridView.get_SelectedRows()
在 MeterDMS.FormUI.FormFuhe.Worker_DoWork(Object sender, DoWorkEventArgs e)
我是正在进行删除选中行的操作,大概有10w多行,调用了datagridview的selectedrows方法,等了一段时间给我报了异常,
有没有其他办法获取选中的区域
本身datagridview的数据源就是从数据库读出来的DataTable,都已经显示出来了。看这报告,怕不是把这些单元格又复制了一遍到内存里= =