回复 7楼langren82的帖子
后天给 Spread 每个单元格添加前台 js 方法如下:
- protected override void Render(HtmlTextWriter writer)
- {
- Table tb = this.FpSpread1.FindControl("viewport") as Table;
- int rowCount = tb.Rows.Count;
- int colCount = tb.Rows[0].Cells.Count;
- for (int i = 0; i < rowCount; i++)
- {
- for (int j = 0; j < colCount; j++)
- {
- tb.Rows[i].Cells[j].Attributes.Add("onclick","test")
- }
- }
- base.Render(writer);
- }
复制代码 |