在datagridview加载时写点东西 [英] Write something While datagridview is loading

查看:66
本文介绍了在datagridview加载时写点东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我想在datagridview从sql表中加载数据时写正在加载"
我该怎么办?
我正在使用C#winForms

Hello everybody i want to write ''Loading'' while datagridview is loading data from sql table
How can i do that?
Im using C# winForms

推荐答案

您需要将数据加载到后台工作线程中,因此您的主UI线程将在加载数据时保持响应状态.这样,您就可以在用户等待数据加载时在对话框/窗体上显示加载消息.
You need to load the data in a background worker thread, so your main UI thread will remain responsive while the data loads. This will let you show a loading message on the dialog/form while the user is waiting for the data to load.


这篇关于在datagridview加载时写点东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆