找回密码
 立即注册

QQ登录

只需一步,快速开始

icerose

银牌会员

4

主题

9

帖子

2088

积分

银牌会员

积分
2088

活字格认证

icerose
银牌会员   /  发表于:2012-2-25 02:32  /   查看:5307  /  回复:3
我已经在设计器将  Cells[0, 0] 设置为ButtonCellType类型了,但是OnClientClick 要根据实际情变改变,请问如何在服务器端获取单元格中控件呢?
protected override void Render(HtmlTextWriter writer)
        {
            FarPoint.Web.Spread.ButtonCellType bt = new FarPoint.Web.Spread.ButtonCellType();
            bt = FpSpread1.ActiveSheetView.Cells[0, 0].CellType as FarPoint.Web.Spread.ButtonCellType;
            bt.OnClientClick = "Button2_onclick();";
            bt.Text = "ppp";
            base.Render(writer);
        }


好象没有任何效果OnClientClick和text都没有发生变化.

3 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2012-2-27 09:53:00
沙发
icerose 你好:
建议把 Page render 中代码放在Page_Load 中,可以执行成功。
回复 使用道具 举报
icerose
银牌会员   /  发表于:2012-2-27 21:44:00
板凳
可以运行成功,谢谢了 ~~~
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-2-29 09:20:00
地板

回复 3# icerose 的帖子

:v:
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部