以下代码冻结了我的 UI。
'Load DataTable using backgroundworker with 15,000 records
...
'On backgroundworker's run completed event, pass loaded table
'and fill datagridview control
dim t as DataTable
t = DirectCast(e.Result, DataTable)
'This part takes very long and FREEZE UI
gridview.DataSource = t
有人有解决加载部分的方法吗?DataGridView 中没有异步加载方法,我无法将 gridView.DataSource = t 放在后台工作线程中,因为它会与 UI 线程冲突。请帮忙..