在datagrid中显示记录需要时间! [英] Display of records in datagrid takes time!

查看:141
本文介绍了在datagrid中显示记录需要时间!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在datagrid中显示信息,一些信息是数据库(sqlserver)的大约1000条记录,但是要显示这个信息c#,除非4秒这样做...。



当应用程序没有立即看到结果时,如何继续按下按钮,应用程序重复相同的功能多少时间(悲伤的) )...



我做了一个断点,时间是在函数的结尾和窗口或datagrid的显示之间...正常!!!!



如果是,有任何解决方案来显示部分,当他使用滚动时,datagrid添加另一部分(如Facebook)?

解决方案

最好的解决方案是实现分页。有一篇文章在 http://www.eggheadcafe.com/tutorials/aspnet/8a2ea78b-f1e3-45b4-93ef-32b2d802ae17/wpf-datagrid-custom-paging-and-sorting.aspx



无论如何,请确保禁用按钮,直到网格完成显示,并显示等待光标。用户不应该想知道应用程序是正在工作还是失败。


I have to display information in datagrid some information is about 1000 record from the database (sqlserver) but to display this information c# take unless 4 sec to do that ….

And how work with the application when he don’t see the result immediately he continue to press the button and the application repeat the same function many time due to that (sad) …

I make a break point the time is between the end of the function and the display of window or datagrid … are that normal !!!!

If yes there’s any solution to display a part and when he use the scroll the datagrid add another part (like facebook) ??

解决方案

The best solution is to implement paging. There is an article at http://www.eggheadcafe.com/tutorials/aspnet/8a2ea78b-f1e3-45b4-93ef-32b2d802ae17/wpf-datagrid-custom-paging-and-sorting.aspx that covers it.

Regardless, make sure you disable the button until the grid has finished displaying, and show a wait cursor as well. A user should never have to wonder if the application is working or failing.

这篇关于在datagrid中显示记录需要时间!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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