[英]Can I write event handler of any control on other page
I am using sitefinity
CMS
to develop my web Application. 我正在使用
sitefinity
CMS
开发我的Web应用程序。 Here I stuck in a problem where I am using sitefinity's inbuild Event Calendar widget and it was looking as expected but now client want Weekends to be displayed with different background color, I tried and searched on net but I found in way and that is to write DayRender
event of RadScheduler
control. 在这里,我遇到了一个问题,即我正在使用sitefinity的inbuild Event Calendar小部件,它的外观符合预期,但是现在客户希望以不同的背景色显示Weekends,我尝试并在网上进行搜索,但发现的方式就是写
DayRender
的事件RadScheduler
控制。 ( RadScheduler
is a control which sitefinity is internally using.). (
RadScheduler
是sitefinity内部使用的控制)。 I could have build User Control
for customisation but it is not only a calendar in application, we have many, with different requirement. 我可以构建用于自定义的
User Control
,但它不仅是应用程序中的日历,而且我们有许多不同的要求。 I was thinking to write that Event Handler but since I have no access to code behind of inbuild widget so I am wondering if it is possible to write event handler of any page. 我当时正在考虑编写该事件处理程序,但是由于我无法访问内置小部件后面的代码,因此我想知道是否可以编写任何页面的事件处理程序。 Something like
<telerik:RadScheduler OnDayRender="fileName/EventName"/>
. 类似于
<telerik:RadScheduler OnDayRender="fileName/EventName"/>
。 If there is a way to do that please help me or suggest something different. 如果有办法,请帮助我或提出其他建议。
Thanks. 谢谢。
If you are looking to just change the background colors of weekends you can use css to override the default styling. 如果您只想更改周末的背景颜色,则可以使用CSS覆盖默认样式。 In looking at the calendar markup, I'm seeing two classes you can use to key in off of, rsSatCol and rsSunCol.
在查看日历标记时,我看到可以用来键入rsSatCol和rsSunCol的两个类。 Something like this should work:
这样的事情应该起作用:
.RadScheduler .rsSunCol, .RadScheduler .rsSatCol {
background-color: red;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.