RadScheduler 显示全天活动
嘿,这是一个愚蠢的问题要问你。您需要做什么才能让约会在 Telerik 的 RadScheduler 中显示为全天活动?您如何告诉 RadScheduler 该特定记录是全天事件(与开始和结束日期有关)?
Hey, here is a stupid question for you. What do you have to do to get an appointment to displayed as an all day event in Telerik's RadScheduler? How do you tell the RadScheduler that this specific record is an all day event (something to do with start and end dates)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种方法如下:
在您的 aspx 文件中,将以下属性添加到 RadScheduler 标记中。
我尚未输入所需的所有属性。您可以填写这些内容。
然后在您的代码隐藏文件中,您的 StartDate 和 EndDate 相差 24 小时。请注意,由于开始日期和结束日期是日期时间字段,因此您可以在其中包含时间,因此它们之间存在 24 小时的差异。这将自动在日历中显示为全天事件。
我创建了一个新的 DataTable 并将其作为数据源提供给 RadScheduler。
这就是需要做的全部事情。此外,对于日历中的每个约会或条目,都必须为数据表创建一个新行。
还有其他方法可以做到这一点,这就是其中之一。
One way to do it is as follows:
In your aspx file add the following attribute to the RadScheduler tag
I have not entered all the attributes that are required. You can fill those in.
Then in your code behind file have a difference of 24 hours in your StartDate and EndDate. Note that since start date and end date are datetime fields you can have time in it and hence have a difference of 24 hours in them. This will automatically appear as allday event in the calendar.
I created a new DataTable and provided that as a Data Source to the RadScheduler.
That is all there is that needs to be done. Also for each appointment or entry in the calendar a new row has to be created for the DataTable.
There are other ways to do this and this is one of them.