简体   繁体   English

我可以在其他页面上编写任何控件的事件处理程序吗

[英]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.

相关问题 如何传递参数来控制事件处理程序? - How can I pass a parameter to control event handler? 如何在Page.IsPostBack之前运行事件处理程序 - How can I run a event handler before Page.IsPostBack Winforms 将 Control 转换为其他控件类型并分配特定的事件处理程序 - Winforms cast Control to other control type and assign specific event handler 如何将事件处理程序设置为控件? - How do i set event handler to a control? 我可以使用什么事件处理程序来告诉DataGrid控件何时完成排序? - What event handler can I use to tell when a DataGrid control has finished sorting? 我可以将在另一个用户控件中定义的函数绑定为当前事件处理程序吗? - Can I binding a function defined in another user-control as current event handler? 如何配置控件的click事件处理程序以在创建对象时将其删除? - How can I configure the click event handler of a control for removing itself at its object creation? 在 1 个控件中添加 2 个事件处理程序 - Adding 2 Event Handler in 1 Control 从宿主页面在用户控件中调用事件处理程序 - Call an event handler in a user control from host page 可以在传递给事件处理程序的Control对象上使用switch语句吗? - Can a switch statement be used on Control objects passed to an event handler?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM