如何使用Gridview创建自定义日历以显示100年的每日时间表 [英] How Do I Create Custom Calendar To Show Daily Schedule Of 100 Years Using Gridview

查看:124
本文介绍了如何使用Gridview创建自定义日历以显示100年的每日时间表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网格视图中显示每日日历。我想要的是在gridview中构建自定义日历,从系统管理员输入的日期开始到结束。例如,如果管理员输入开始日期为1950,结束日期为2050,那么将构建100年的日历。这也意味着一年需要创建365行,因此总共需要35600行。此外,每天都会发生像假期这样的事件,也可以包含在网格视图中。我喜欢这会对系统的速度和性能产生什么影响。如果可能的话,有没有其他方法来做同样的事情!!!

提前谢谢

I wanted to show daily calender in grid view. What I wanted is to build custom calender in gridview starting from and ending to the date that admin of the system enters. For instance, if admin enters start date as 1950 and end date as 2050, then calendar of 100 years is to be build. This also mean for a year, 365 rows is to be created so total of 35600 rows is required. Also, on each day, an event like holiday can occur which is also to be included in grid view. I wander what will the impact of this be on the speed and performance of system. if possible, is there alternative way to do this thing is same way!!!
Thanks in advance

推荐答案

如果你真的想做这样,我认为最好的解决方案是分页并确定用户想要查看的数据。



例如,范围是从1950到2050(100年),只需添加一个列表框,这样用户可以选择他们想要查看哪一年(列表框项目是1950年,1951年...... 2050年)。当用户选择年份时,将今年的数据加载到gridview,如果你想提高性能,搜索谷歌如何分页网格视图,这样过程会更快。
If you relly wanna do this way, i think the best solution is paging and determine what data user wanna view.

Example, the range is from 1950 to 2050 (100 years), just add a list box so user can chose which year they wanna view (list box items are 1950, 1951 ... 2050). When user chose year, load data of this year to gridview, if you wanna increase performance, search google how to paging grid view, so the process will be faster.


这篇关于如何使用Gridview创建自定义日历以显示100年的每日时间表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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