请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册

QQ登录

只需一步,快速开始

coco

注册会员

3

主题

4

帖子

43

积分

注册会员

积分
43
最新发帖
coco
注册会员   /  发表于:2019-3-25 17:42  /   查看:3010  /  回复:1
如题,假如一个Cell是number类型的,然后我想在代码中动态的改变number类型的某些属性。

1 个回复

倒序浏览
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2019-3-26 15:32:32
沙发
您好,写了个简单的例子,点击一下按钮,把TextBox的HighLightText属性修改。
  1.            this._gcMultiRow.Template = Template.CreateGridTemplate(new List<Cell>()
  2.             {
  3.                 new TextBoxCell(),
  4.             });
  5.             this.Controls.Add(this._gcMultiRow);

  6.             var button = new Button();
  7.             button.Location = new Point(300, 300);
  8.             this.Controls.Add(button);
  9.             button.Click += (s, e) =>
  10.             {
  11.                 var textBoxCell = this._gcMultiRow.Template.Row.Cells[0] as TextBoxCell;
  12.                 textBoxCell.HighlightText = true;
  13.                 this._gcMultiRow.Template = this._gcMultiRow.Template;
  14.             };
复制代码

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