开发者

Loading Animation for GridView's

开发者 https://www.devze.com 2023-03-06 16:09 出处:网络
I have a dashboard like interface for the ASP.NET (C#) application I am developin开发者_如何学Gog . There are a few GridView\'s on this page that take awhile to query all the data from the database. T

I have a dashboard like interface for the ASP.NET (C#) application I am developin开发者_如何学Gog . There are a few GridView's on this page that take awhile to query all the data from the database. The GridView's just display data. Is there a way I can load the page and just display a loading icon for each of this GridView's while they load?

Thanks.


You can try something like the following:

  1. Place all of your GridViews inside of Update Panels
  2. Do not bind them on page load
  3. Place a timer on the page inside an update panel and set it to trigger 500ms after the page loads
  4. Now, bind your GridViews

Combine the above with the AJAX Toolkit UpdatePanel Animation Extender and you'll have what you're looking for.

This will make it appear as if your GridViews are being loaded dynamically AFTER the page loads and your users will see loading icons notifying them.

You can also see a full working (similar) example here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号