在c#中将进度条与datagridview链接 [英] Linking progressbar with datagridview in c#

查看:213
本文介绍了在c#中将进度条与datagridview链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在运行一个Windows窗体项目。在表单上有一个datagridview,一个进度条,一个文本框和两个2按钮。



这两个按钮用于浏览记录(一个用于下一个记录文本框显示当前正在查看的记录。



如何将进度链接到数据库或本例中的datagridview和当按下下一个按钮时,它会递增,当单击上一个按钮时,它会递减,并且当达到最后一个记录时进度也会完全填满?



现在我我不是要求任何人做或编写整个代码,如果你能告诉我该怎么做我会很高兴。



谢谢你你的时间

Hi,
I am running a windows forms project. on the form there is a datagridview, a progress bar, a textbox and two 2 buttons.

The two buttons are used to navigate through the records(one for next record and the other for previous record) the textbox displays the record that is being currently viewed.

How can I link the progress with the database or in this case the datagridview and when the next button is pressed it increments and when the previous button is clicked it decrements and also the progress to be fully filled when the last record is reached ?

Now I am not asking for anyone to do or to write the entire code for , if you can just please show me how to do it i will be happy.

Thank you for your time

推荐答案

你在寻找的是你的数据库和你的应用程序之间的异步通信。这也许可以通过线程来完成。但在你的情况下,你应该去进度条,gridview和按钮:)



类似的线程是 here [ ^ ]。



-KR
What you're looking is Asynchronous Communication between your database and your application. That maybe done through Threading as well. But in your case, you should go for progress bar, gridview and button :)

Similar thread is here[^].

-KR


这篇关于在c#中将进度条与datagridview链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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