回复 3楼xujingtian的帖子
大体思路是通过后天给 rowheader 添加前台点击事件:
- protected override void Render(HtmlTextWriter writer)
- {
- Table tb = this.FpSpread1.FindControl("rh") as Table;
- tb.Rows[0].Cells[0].Style.Value = "background:url(Untitled.png) no-repeat right;";
- for (int i = 0; i < tb.Rows.Count; i++)
- {
- for (int j = 0; j < tb.Rows[0].Cells.Count; j++)
- {
- tb.Rows[i].Cells[j].Attributes.Add("onclick","rowcellclick()")
- }
- }
- base.Render(writer);
- }
复制代码
再从前台 CallBack 回后天处理:
- <script type="text/javascript">
- function rowcellclick() {
- var Spread=this.document.getElementById("FpSpread1");
- spread.CallBack("button");
- }
- </script>
复制代码
您现在使用 Spread 控件应该很熟练了,相信可以完成下来的代码。 |