Hi, sam
Spread没有提供这样的属性设置,不过可以重写Render来实现:
- protected override void Render(HtmlTextWriter writer)
- {
- Table viewport = FpSpread1.FindControl("viewport") as Table;
- viewport.Rows[0].Cells[0].Attributes.Add("onMouseOver", "mouseover(this)");
- viewport.Rows[0].Cells[0].Attributes.Add("onMouseOut", "mouseout(this)");
- base.Render(writer);
- }
复制代码- <script type="text/javascript" language="javascript">
- function mouseover(sender) {
- sender.setAttribute("style", "background-color:red");
- }
- function mouseout(sender) {
- sender.setAttribute("style", "background-color:white");
- }
- </script>
复制代码 |