回复 5楼怕瓦落地的帖子
抱歉,让您久等了,测试代码如下:
- protected override void Render(HtmlTextWriter writer)
- {
- int sheetIndex = this.FpSpread1.ActiveSheetViewIndex;
- var table = this.FpSpread1.FindControl("cmdTable") as Table;
- List<TableCell> cells = new List<TableCell>();
-
- if (table != null)
- {
- for (int i = 0; i < table.Rows[0].Cells.Count; i++)
- {
- if (table.Rows[0].Cells[i].Attributes["isbutton"]=="1")
- {
- cells.Add((table.Rows[0].Cells[i]));
- }
- }
- cells[sheetIndex].BackColor = Color.Red;
-
- }
- base.Render(writer);
- }
复制代码 |