C# red cross in datagridview

前端 未结 2 595
-上瘾入骨i
-上瘾入骨i 2021-01-15 04:38

i am using c# and when i try to fill my datagridView most of the time a big red cross apears.

i searched for this and people say that you have to add



        
2条回答
  •  清酒与你
    2021-01-15 05:15

    Same question here. Use Invoke method

    if (gridView.InvokeRequired)
        gridView.Invoke(new MethodInvoker(() => gridView.DataSource = YOUR_DATASOURCE));
    else
        gridView.DataSource = YOUR_DATASOURCE;
    

提交回复
热议问题