回复 1楼zhu_99031的帖子
你好,测试代码如下:
后台:
- protected override void Render(HtmlTextWriter writer)
- {
- Table viewPort = this.FpSpread1.FindControl("viewPort") as Table;
- for (int i = 0; i < viewPort.Rows.Count; i++)
- {
- for (int j = 0; j < viewPort.Rows[i].Cells.Count; j++)
- {
- if (j==1)
- {
- viewPort.Rows[i].Cells[j].Attributes.Add("onclick", "test()");
- }
- }
- }
- base.Render(writer);
- }
复制代码
前台:
- <script type="text/javascript">
- function test() {
- alert('Column1');
- }
- </script>
复制代码 |