SkinDataGridView绑定DataTable 线程添加数据后控件显示异常
使用道具 举报
乔克斯 发表于 2018-4-11 01:59 多线程中操作主线程UI。要委托主线程操作UI。
/// <summary> /// 重新绘制控件 /// </summary> private void KeywordRankingControlUpdate() { //验证是否再UI线程上 if (KeywordRankingDataGridView.InvokeRequired) { KeywordRankingControlUpdateDelegate controlUpdate = new KeywordRankingControlUpdateDelegate(KeywordRankingControlUpdate); Invoke(controlUpdate); } else { KeywordRankingDataGridView.Refresh(); } }
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页